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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Unsolved How to update PixelFed storage per user

    Pixelfed
    4
    8
    414
    Loading More Posts
    • 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
      subtlecourage last edited by

      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?

      murgero 1 Reply Last reply Reply Quote 0
      • murgero
        murgero App Dev @subtlecourage last edited by

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

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

        S 1 Reply Last reply Reply Quote 0
        • S
          subtlecourage @murgero last edited by

          @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 Reply Quote 0
          • girish
            girish Staff last edited by

            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 Reply Quote 0
            • S
              subtlecourage @girish last edited by

              @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 Reply Quote 0
              • robi
                robi last edited by

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

                Life of Advanced Technology

                S 1 Reply Last reply Reply Quote 0
                • S
                  subtlecourage @robi last edited by

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

                  robi 1 Reply Last reply Reply Quote 0
                  • robi
                    robi @subtlecourage last edited by

                    @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.

                    Life of Advanced Technology

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Powered by NodeBB