Cannot upload file, bad request

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Upload a file through phone

The output of your Nextcloud log in Admin > Logging:

	Sabre\DAV\Exception\BadRequest: expected filesize 178898 got 0
/var/www/drive.potsmc.net/apps/dav/lib/Connector/Sabre/Directory.php - line 151: OCA\DAV\Connector\Sabre\File->put(Resource id #99)
/var/www/drive.potsmc.net/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096: OCA\DAV\Connector\Sabre\Directory->createFile('PotsMobile.psd', Resource id #99)
/var/www/drive.potsmc.net/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525: Sabre\DAV\Server->createFile('PotsMobile.psd', Resource id #99, NULL)
[internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/drive.potsmc.net/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/var/www/drive.potsmc.net/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PUT', Array)
/var/www/drive.potsmc.net/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/drive.potsmc.net/apps/dav/appinfo/v1/webdav.php - line 80: Sabre\DAV\Server->exec()
/var/www/drive.potsmc.net/remote.php - line 164: require_once('/var/www/drive....')
{main}

Same here, plus:

Steps to replicate it:
upload a file using either a sync client or web interface