Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Pixelfed
  3. How to update PixelFed storage per user

How to update PixelFed storage per user

Scheduled Pinned Locked Moved Unsolved Pixelfed
8 Posts 4 Posters 1.6k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      S Offline
      subtlecourage
      wrote on last edited by
      #1

      The title says it all, the default is 1Gig per user, Id like to set it to 10gig per user, any help or ideas on this?

      murgeroM 1 Reply Last reply
      0
      • S subtlecourage

        The title says it all, the default is 1Gig per user, Id like to set it to 10gig per user, any help or ideas on this?

        murgeroM Online
        murgeroM Online
        murgero
        App Dev
        wrote on last edited by
        #2

        @subtlecourage Don't know if it helps, but maybe: https://docs.pixelfed.org/running-pixelfed/installation.html

        --
        https://urgero.org
        ~ Professional Nerd. Freelance Programmer. ~

        S 1 Reply Last reply
        0
        • murgeroM murgero

          @subtlecourage Don't know if it helps, but maybe: https://docs.pixelfed.org/running-pixelfed/installation.html

          S Offline
          S Offline
          subtlecourage
          wrote on last edited by
          #3

          @murgero said in How to update PixelFed storage per user:

          @subtlecourage Don't know if it helps, but maybe: https://docs.pixelfed.org/running-pixelfed/installation.html

          Thank you for that, with that then, I have discovered a bug within the app.

          Bug 1: When I change LIMIT_ACCOUNT_SIZE=true to LIMIT_ACCOUNT_SIZE=false, restart the app, then revert the changes - the limit (atleast graphically) never shows back up.

          Bug 2: When I change MAX_ACCOUNT_SIZE=1000000 to MAX_ACCOUNT_SIZE=10000000000 and restart the app, the UI still shows the original 1Gb file limit

          This was performed with a vanilla install, version 1.6.1

          1 Reply Last reply
          0
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #4

            The feature does seem to have some implementation - https://github.com/pixelfed/pixelfed/blob/cdfb6ac25f0090c5e033b2bc813c076aefac9ba4/app/Http/Controllers/Api/ApiV1Controller.php#L1072

            S 1 Reply Last reply
            0
            • girishG girish

              The feature does seem to have some implementation - https://github.com/pixelfed/pixelfed/blob/cdfb6ac25f0090c5e033b2bc813c076aefac9ba4/app/Http/Controllers/Api/ApiV1Controller.php#L1072

              S Offline
              S Offline
              subtlecourage
              wrote on last edited by
              #5

              @girish

              So I do see that on 1072

              		if(config_cache('pixelfed.enforce_account_limit') == true) {
              			$size = Cache::remember($user->storageUsedKey(), now()->addDays(3), function() use($user) {
              				return Media::whereUserId($user->id)->sum('size') / 1000;
              			});
              			$limit = (int) config_cache('pixelfed.max_account_size');
              			if ($size >= $limit) {
              			   abort(403, 'Account size limit reached.');
              			}
              		}
              

              However, if you try to disable then re-enable to limit, it wont show back up.

              Also, if I change the limit, it wont reflect that in the GUI of any logged in user.

              1 Reply Last reply
              0
              • robiR Offline
                robiR Offline
                robi
                wrote on last edited by
                #6

                it may be a DB issue with the rapid changes not being refreshed until the UI syncs up again.

                Conscious tech

                S 1 Reply Last reply
                0
                • robiR robi

                  it may be a DB issue with the rapid changes not being refreshed until the UI syncs up again.

                  S Offline
                  S Offline
                  subtlecourage
                  wrote on last edited by
                  #7

                  @robi So how can I verify that the limit is actually in effect?

                  robiR 1 Reply Last reply
                  0
                  • S subtlecourage

                    @robi So how can I verify that the limit is actually in effect?

                    robiR Offline
                    robiR Offline
                    robi
                    wrote on last edited by
                    #8

                    @subtlecourage trust it, test it, or do some other update that refreshes the UI so it reflects what you expect.

                    There's no evidence it doesn't work as set in the config.

                    Conscious tech

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search