We're Hiring!

Mattermost, Inc.

Android App doesn't take max filesize?

Summery: Upload on the mobile app doesn’t work with size>??MB, upload desktop app works fine, upload smaller files also works fine.

Steps to reproduce
Latest Android App, Server version 5.34.2

Expected behavior
File Upload works fine, same size limit as for desktop app.

Observed behavior
When I upload a File on the android app, my nginx tells me in debug mode:
2021/04/28 18:38:57 [debug] 133996#133996: *80 http upstream request: “/api/v4/files?”
2021/04/28 18:38:57 [debug] 133996#133996: *80 http upstream send request handler
2021/04/28 18:38:57 [debug] 133996#133996: *80 http upstream send request
2021/04/28 18:38:57 [debug] 133996#133996: *80 http upstream send request body
2021/04/28 18:38:57 [debug] 133996#133996: *80 chain writer buf fl:0 s:755
2021/04/28 18:38:57 [debug] 133996#133996: *80 chain writer buf fl:1 s:12496475
2021/04/28 18:38:57 [debug] 133996#133996: *80 chain writer in: 00005626DC99D620
2021/04/28 18:38:57 [debug] 133996#133996: *80 writev: 2586539 of 12497230
2021/04/28 18:38:57 [debug] 133996#133996: *80 writev: -1 of 9910691
2021/04/28 18:38:57 [debug] 133996#133996: *80 writev() not ready (11: Resource temporarily unavailable)
2021/04/28 18:38:57 [debug] 133996#133996: *80 chain writer out: 00005626DC99D630
2021/04/28 18:38:57 [debug] 133996#133996: *80 event timer: 43, old: 34798950, new: 34798950
2021/04/28 18:38:57 [debug] 133996#133996: *80 http upstream request: “/api/v4/files?”
2021/04/28 18:38:57 [debug] 133996#133996: *80 http upstream process header
2021/04/28 18:38:57 [debug] 133996#133996: *80 malloc: 00005626DD5F3A60:524288
2021/04/28 18:38:57 [debug] 133996#133996: *80 recv: eof:1, avail:-1

Relevant Settings:
mattermost:
“FileSettings”: {
“EnableFileAttachments”: true,
“EnableMobileUpload”: true,
“EnableMobileDownload”: true,
“MaxFileSize”: 1048576000,
“DriverName”: “local”,
“Directory”: “./data/”,
“EnablePublicLink”: true,
“ExtractContent”: false,
“ArchiveRecursion”: false,

nginx:
access_log /var/log/nginx/mattermost.access.log combined;
error_log /var/log/nginx/mattermost.error.log debug;

location ~ /api/v[0-9]+/(users/)?websocket$ {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
client_body_buffer_size 1000M;
client_max_body_size 1000M;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_buffers 2048 512k;
proxy_buffer_size 512k;
client_body_timeout 60;
send_timeout 300;
lingering_timeout 5;
proxy_connect_timeout 90;
proxy_send_timeout 300;
proxy_read_timeout 90s;
proxy_pass http://backend;
}

location / {
client_body_buffer_size 1000M;
client_max_body_size 1000M;
proxy_set_header Connection “”;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_buffers 2048 512k;
proxy_buffer_size 512k;
proxy_read_timeout 600s;
proxy_cache mattermost_cache;
proxy_cache_revalidate on;
proxy_cache_min_uses 1;
proxy_cache_use_stale timeout;
proxy_cache_lock on;
proxy_http_version 1.1;
proxy_pass http://backend;
}
}