summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-05-06 18:26:42 +0200
committerJulius Härtl <jus@bitgrid.net>2023-03-08 14:00:04 +0100
commite23aa8883ec0dff03b973fb0bf690cb8482218cf (patch)
treea0ced21511e1dc90d3bd450ea39d88cda0d729b2 /core
parent80e12cf72608b7c5776f02f04da98d7a5968bc73 (diff)
downloadnextcloud-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 'core')
-rw-r--r--core/src/files/client.js9
1 files changed, 5 insertions, 4 deletions
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)
},
/**