element-hq / element-hq/element-android
File is too large to upload, while server limit is much higher
- Dominant language
- Kotlin
- Stars
- 3.7k
- Forks
- 917
- PR merge metrics
- No merged PRs in 30d
Description
### 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
Contributor guide
Assessment
This issue has not been assessed yet.