From e23aa8883ec0dff03b973fb0bf690cb8482218cf Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Thu, 6 May 2021 18:26:42 +0200 Subject: feat(s3): Use multipart upload for chunked uploading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows to stream file chunks directly to S3 during upload. Signed-off-by: Julius Härtl --- apps/files/js/jquery.fileupload.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/files/js/jquery.fileupload.js') 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; -- cgit v1.2.3