diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-05-06 18:26:42 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2023-03-08 14:00:04 +0100 |
commit | e23aa8883ec0dff03b973fb0bf690cb8482218cf (patch) | |
tree | a0ced21511e1dc90d3bd450ea39d88cda0d729b2 /apps/files/js/jquery.fileupload.js | |
parent | 80e12cf72608b7c5776f02f04da98d7a5968bc73 (diff) | |
download | nextcloud-server-e23aa8883ec0dff03b973fb0bf690cb8482218cf.tar.gz nextcloud-server-e23aa8883ec0dff03b973fb0bf690cb8482218cf.zip |
feat(s3): Use multipart upload for chunked uploading
This allows to stream file chunks directly to S3 during upload.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/files/js/jquery.fileupload.js')
-rw-r--r-- | apps/files/js/jquery.fileupload.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files/js/jquery.fileupload.js b/apps/files/js/jquery.fileupload.js index 9b382ccae39..da516b15e1c 100644 --- a/apps/files/js/jquery.fileupload.js +++ b/apps/files/js/jquery.fileupload.js @@ -733,6 +733,12 @@ promise = dfd.promise(), jqXHR, upload; + + // Dynamically adjust the chunk size for Chunking V2 to fit into the 10000 chunk limit + if (file.size/mcs > 10000) { + mcs = Math.ceil(file.size/10000) + } + if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) || options.data) { return false; |