Setting the uploadPartSize for S3 external stroage

Nextcloud version: 22.2.0
Operating system and version: Ubuntu 20.04
PHP version (eg, 7.4): 8.0.11

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

I have Nextcloud 22 running (as a snap on Ubuntu) and working fine. However, I need to modify some settings for an external self hosted S3 storage. Specifically I need to change the part size for multi part (big) uploads. The option exists in NextCloud but it appears to be undocumented and not changeable via the web GUI (or OCC?). From it is stated the upload part size can be configured via config.php. However, I cannot find any examples/docs that show this other than if the S3 was being setup as Primary storage (which doesn’t explicitly show it but I assume its an additional parameter in the objectstore structure in those examples)…

But since it is an option in the code, How do I configure the upload part size for a normal external storage for nextcloud? Or more precisely what do I edit to pass in the upload part size for an external S3 storage? (see line below)
$this->uploadPartSize = !isset($params[‘uploadPartSize’]) ? 524288000 : $params[‘uploadPartSize’];

Thank you.
Steps to replicate it:

I digged into this too.

Your quote is in lib/private/Files/ObjectStore/S3ConnectionTrait.php
I believe it is not called in apps/files_external/lib/Lib/Backend/AmazonS3.php
… where ->addParameters would add it.

I too think, it is not yet in the GUI code.
But some DEV may know better.


A note:
Take note of tmp files for big uploads. It’s not always a chunksize problem.