[Self-hosted] Custom Avatar Max Size isn't honored

(#775) Bug Needs triage profiles self-hosting

Observed behaviour

After looking into changing Avatar Max Size, I realized that changing the value doesn't take effect. The limit can be changed in the admin page -> Limit Config -> Files & Attachments -> Avatar Max Size. During investigating the typeScript code responsible for the max size, I stumbled upon a fix value for the Avatar Max Size.

Reproduction steps

  1. Selfhost Fluxer
  2. Change the Avatar Max Size in the admin page to a higher value than the default (10 MB)
  3. Create a User
  4. Upload a Avatar bigger that the default size limit (10 MB)

Build information

Stable Web 2026.816.210712, Windows NT 10.0 (x64), Chrome 151.0.0.0, Locale en-US

Platform

Self-hosting

Evidence

  • 637150675-7a6490f6-b5cb-4f98-a7df-aae5f037ad95.png

    637150675-7a6490f6-b5cb-4f98-a7df-aae5f037ad95.png

    444×207 | 9 kB

2 comments

Sign in with Fluxer to comment and vote.
Comment by @KeckigerKeks
RexSystem 1 vote originally by @KeckigerKeks on GitHub OP
Unfortunately I can't contribute a fix, but I can give suggestions in here: In File fluxer_app/src/features/user/components/modals/tabs/my_profile_tab/AvatarUploader.tsx and Line 177 it checks for file sizes over 10 MB: if (file.size > 10 * 1024 * 1024) {
Comment by ternera
terneraMod 1 vote originally by @ternera on GitHub
I worked on this a little bit: https://github.com/ternera/fluxer/commit/dd9811f25400ea7be159aa4383d24e96fcab073f Testing locally, it fixed the root issue, but there is still a problem because 10MB is hardcoded in I18nDisplayConstants.ts. Even if you increase the limit to 20MB (for example) and upload a 30MB image, it still says to choose a file smaller than 10MB. However, when I increased the limit to 100MB and uploaded a 30MB file, it worked fine.