Upload 400 bad request "Expected filesize of 508271 bytes but read 8192 bytes"

Currently I can’t upload any documents to my nextcloudpi, I can still access documents but whenever the nextcloud windows desktop client tries to upload it fails with the error

Server replied “400 bad request” to "PUT https://XXX/document.pdf (Expected filesize of 508271 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 8192 bytes. Could be either a network problem on the sending side or a problem writing to the storage on the server side.)

The same error happens for each file with the expected size changing but the read size is always 8192 bytes.

I have tried the fix permissions tool and it ran without error and I have updated nextcloud and ncp to the latest available versions.
Neither the pi’s sd card or the external hard drive are full.

In the config file I can see that the data directory is “/media/myCloudDrive/ncdata” and the temp directory is “/media/myCloudDrive/ncdata/tmp”.

Does anyone know how to fix this?

The tmp directory path may also need to be edited inside /etc/php/7.3/fpm/php.ini
There are several post already on this subject. After edit php.ini reload php-fpm.service for changes to take affect.