From 54a6b99e754b46b819e459961382f304d8bf2716 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Sun, 26 Jun 2022 22:05:56 -0700 Subject: [PATCH] remove chunkSize backwards compatibility (#3830) see #3511 --- src/server/Uploader.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/server/Uploader.js b/src/server/Uploader.js index 0e14d1120e..1d888507c3 100644 --- a/src/server/Uploader.js +++ b/src/server/Uploader.js @@ -635,14 +635,6 @@ class Uploader { const filename = this.uploadFileName const { client, options } = this.options.s3 - function getPartSize (chunkSize) { - // backwards compatibility https://github.com/transloadit/uppy/pull/3511#issuecomment-1050797935 - // requires min 5MiB and max 5GiB partSize - // todo remove this logic in the next major semver - if (chunkSize == null || chunkSize >= 5368709120 || chunkSize <= 5242880) return undefined - return chunkSize - } - const params = { Bucket: options.bucket, Key: options.getKey(null, filename, this.options.metadata), @@ -655,7 +647,8 @@ class Uploader { if (options.acl != null) params.ACL = options.acl const upload = client.upload(params, { - partSize: getPartSize(this.options.chunkSize), + // using chunkSize as partSize too, see https://github.com/transloadit/uppy/pull/3511 + partSize: this.options.chunkSize, }) upload.on('httpUploadProgress', ({ loaded, total }) => {