element-android icon indicating copy to clipboard operation
element-android copied to clipboard

File is too large to upload, while server limit is much higher

Open Fmajor opened this issue 3 years ago • 2 comments

Steps to reproduce

  1. I set up a self-hosted Synapse server using the docker image: matrixdotorg/synapse:latest, 1dbbb05f33da
  2. I raise the default max_upload_size config to 500M
  3. I use a nginx reverse proxy, so I also set the client_max_body_size 500M;
location ~ ^(/_matrix|/_synapse/client) {
    proxy_pass http://synapse;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header Host $host;
    # Nginx by default only allows file uploads up to 1M in size
    # Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
    client_max_body_size 500M;
}
4. when I try to upload files (in element-android) that larger than 50M, it raise `File is too large to upload`
5. I try files with different sizes, 49M is ok, 53M is not ok.

Outcome

What did you expect?

file <500M be uploaded

What happened instead?

file >50M failed to upload

Your phone model

Google Pixel 4L

Operating system version

Android 12

Application version and app store

Element 1.3.15 from F-droid

Homeserver

docker image: matrixdotorg/synapse:latest, hash:1dbbb05f33da

Will you send logs?

No

Fmajor avatar Feb 04 '22 23:02 Fmajor

may be related with pr #3264

Fmajor avatar Feb 05 '22 08:02 Fmajor

Exact same issue its limiting to 50MB though my Nginx and server limit is way higher.

shanold avatar Sep 15 '24 15:09 shanold