You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connect to a Wi-Fi network with limited/fluctuating upload bandwidth (in our case the link delivered 0.1-1.5 MB/s).
Upload any file larger than ~10 MB from the Android app to a Nextcloud 34 server.
The chunked upload fails; the app retries and keeps failing.
Expected behaviour
The upload should complete on slow links. The server already advertises files.chunked_upload.max_size via capabilities — the client could use it and pick a chunk size that fits the current throughput and the transfer timeout, so chunks finish well before the deadline.
Actual behaviour
ChunkedFileUploadRemoteOperation uses hardcoded chunk sizes - 40 MB on Wi-Fi (CHUNK_SIZE_WIFI), 10 MB on mobile (CHUNK_SIZE_MOBILE) - and never reads the server's files.chunked_upload.max_size. The client's read timeout is fixed at 60 s (DEFAULT_DATA_TIMEOUT in OwnCloudClientFactory). The server answers a chunk PUT only after the whole body arrives, so on a slow link the 60 s read timeout fires mid-transfer:
client aborts the connection (proxy logs 499),
server gets a truncated chunk and answers 400 BadRequest "chunk smaller than expected",
upload fails and retries forever.
Android version
14
Device brand and model
Samsung Galaxy S24
Stock or custom OS?
Stock
Nextcloud android app version
34.1.0
Nextcloud server version
34.0.2
Using a reverse proxy?
Yes
Android logs
No response
Server error logs
{"reqId":"JR0L5n4PhFC9tmyDp5in","level":3,"time":"2026-08-12T19:14:47+03:00","user":"sonya","method":"PUT","url":"/remote.php/dav/uploads/sonya/<id>/000001","message":"Expected filesize of 40960000 but read (from Nextcloud client) and wrote (to Nextcloud storage) 13336576. Could either be a network problem on the sending side or a problem writing to the storage on the server side.","exception":"Sabre\DAV\Exception\BadRequest"}
Additional information
Proposal for developers: size chunks dynamically instead of per connection type:
respect files.chunked_upload.max_size from capabilities (min(serverMax, ...)),
target a chunk size that fits the measured throughput, e.g. chunk = throughput * factor, keeping a sane floor,
either scale the read timeout with the body size or skip the read deadline while the request body is still being written (writeTimeout already covers sending; the read timeout is what kills the request here).
That way a slow link degrades to smaller resumable chunks instead of a guaranteed failure.
I might have the same problem. I'm running Nextcloud running via CloudFlare (free) tunnel. Uploading a 50MB file via web-browser works normally. However, Android is not able to upload big files. Sometimes it works after a couple of failed attempts.
Current settings:
PHP_UPLOAD_LIMIT=256M
Settings in config.php:
'max_chunk_size' => 10485760 ,
'files.chunked_upload.max_size' => 10485760,
Let me know how to troubleshoot this further. Thanks!
Thanks! After more investigation and lots of troubleshooting, I found that I had to update the NextCloud chunk size (in config.php) and tune some CF-settings. All good now, even with the normal (not QA) app.
For future reference, this worked for me:
CloudFlare: Disable 'HTTP/2 to Origin' under Speed settings.
Hmm, it's still not stable. However, using the QA version it seems stable now! @alperozturk96 i think those fixes are worth to implement. Because the QA version you mentioned do work. Thanks again!
Activity
keesjebal commentedon Aug 19, 2026
I might have the same problem. I'm running Nextcloud running via CloudFlare (free) tunnel. Uploading a 50MB file via web-browser works normally. However, Android is not able to upload big files. Sometimes it works after a couple of failed attempts.
Current settings:
Settings in config.php:
Let me know how to troubleshoot this further. Thanks!
alperozturk96 commentedon Aug 20, 2026
@vc @keesjebal Hello,
Thank you for the report. I created a PR for this. Once the QA APK generated could you please try and share your feedback: #17508 ?
keesjebal commentedon Aug 21, 2026
Thanks! After more investigation and lots of troubleshooting, I found that I had to update the NextCloud chunk size (in config.php) and tune some CF-settings. All good now, even with the normal (not QA) app.
For future reference, this worked for me:
'max_chunk_size' => 5242880, // 5 MB
'files.chunked_upload.max_size' => 5242880,
keesjebal commentedon Aug 30, 2026
Hmm, it's still not stable. However, using the QA version it seems stable now!
@alperozturk96 i think those fixes are worth to implement. Because the QA version you mentioned do work. Thanks again!