Just setup NC in docker this evening by following https://blog.linuxserver.io/2019/04/25/letsencrypt-nginx-starter-guide/#nextcloudsubdomainreverseproxyexample, and sunk about 4 hours so far into trying to work out why its having trouble uploading. Getting the following error for lots of files:
[webdav] Fatal: Sabre\DAV\Exception\BadRequest: Expected filesize of 1217363 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 196608 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side. at <<closure>>
0. /config/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 156
OCA\DAV\Connector\Sabre\File->put(null)
1. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
OCA\DAV\Connector\Sabre\Directory->createFile("DSC_0294.JPG", null)
2. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
Sabre\DAV\Server->createFile("files/C92DA57C- ... G", null, null)
3. <<closure>>
Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
4. /config/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
call_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
5. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
Sabre\Event\EventEmitter->emit("method:PUT", [Sabre\HTTP\Requ ... }])
6. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
7. /config/www/nextcloud/apps/dav/lib/Server.php line 319
Sabre\DAV\Server->exec()
8. /config/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
OCA\DAV\Server->exec()
9. /config/www/nextcloud/remote.php line 165
require_once("/config/www/nex ... p")
PUT /remote.php/dav/files/C92DA57C-F4EA-4537-BB07-EF0C95722152/Phone%20Pictures/2018/08/DSC_0294.JPG
from 192.168.20.101 by C92DA57C-F4EA-4537-BB07-EF0C95722152 at 2020-03-19T21:39:59+00:00
Googling shows that this problem isn’t uncommon, but its one of those that appears to have a million solutions. I’ve confirmed uploading via the webpage is fine, so its only the clients (specifically WebDAV?) that are broken. I’ve checked php.ini and the file size attributes are set ok there. The Nginx config has client_max_body_size 0;
set. At first I thought it was just files larger than 10mb, but I’ve since noticed some above 1mb failing.
Does anyone have any suggestions on where to go next/what other log files I can check?
Thanks