Set uploads folder to external storage?

Nextcloud: 12.0.5
OS: Ubuntu 14.04.5
Apache: 2.2.31-5
PHP: 7.1.13

The issue you are facing:

I’m using a shared server for NC, with the desktop apps on MacOS, and external storage for all files in DreamHost Objects.

Using NC sync app, large files are chunked in user/uploads before being moved to the selected folder in external storage.

The issue is that during large uploads, the temporary uploads folder can fill up to 10s of GB, which triggers a Disc Usage Warning at DreamHost’s end.

What I’d like to do is set the user uploads folder to also be on external storage, but there doesn’t seem to be an obvious way to do this. config.php options ‘tempdirectory’ and ‘part_file_in_storage’ seem like they might be relevant, but I have no idea if they can be used with S3-compatible storage.

So, my question is, is it possible to set the uploads folder or NC sync app temp folder to a bucket on external storage?

Thanks!

Steps to replicate it:

  1. upload large files via sync app
  2. file chunks are stored in user/uploads on shared server before being moved on upload completion to external storage

Nothing of note in NC logs.

config.php is standard.

Apache log has nothing immediately relevant.

This becomes an even bigger problem when your file is large and your external storage is slow. Uploading a large file first fills up the Nextcloud server’s temporary storage, then a copy operation occurs to external storage. This could take quite some time and, is apparently handled synchronously during, say, a WebDAV MOVE request. For me, this results in the connection timing out every time, large files, (even less than 1G) never complete as a result.

Uploads need to go to their storage destination directly and not be first uploaded to the server. I understand that this is difficult to achieve under PHP, but this is 2019 and uploading multi-GB files to cloud services is commonplace. Maximum upload size should not be tied to the location where Nextcloud is running, but only to the available space of the final storage medium.