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 --- core/src/files/client.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core/src') diff --git a/core/src/files/client.js b/core/src/files/client.js index 2c71fbe46e1..9d32fefdfc4 100644 --- a/core/src/files/client.js +++ b/core/src/files/client.js @@ -758,7 +758,7 @@ import escapeHTML from 'escape-html' return promise }, - _simpleCall: function(method, path) { + _simpleCall: function(method, path, headers) { if (!path) { throw 'Missing argument "path"' } @@ -769,7 +769,8 @@ import escapeHTML from 'escape-html' this._client.request( method, - this._buildUrl(path) + this._buildUrl(path), + headers ? headers : {} ).then( function(result) { if (self._isSuccessStatus(result.status)) { @@ -790,8 +791,8 @@ import escapeHTML from 'escape-html' * * @returns {Promise} */ - createDirectory: function(path) { - return this._simpleCall('MKCOL', path) + createDirectory: function(path, headers) { + return this._simpleCall('MKCOL', path, headers) }, /** -- cgit v1.2.3