uppy icon indicating copy to clipboard operation
uppy copied to clipboard

Upload multiple chunks of single file with aws-s3-multipart

Open anark opened this issue 2 years ago • 5 comments

Using the newest aws-s3-multipart on uppy 2 with the batch prepareUploadParts it would be great if you could set the uploader to upload multiple chunks of the same file at once but only upload a single file at a time.

This would help us keep the uploads uploading in the correct order but more efficiently(instead of making a prepareUploadParts request for every single chunk).

When I set the limit to larger than 1 uppy uploads multiple files at once, but with a limit of 1 it will only upload a single file at a time but only one chunk of that file at a time will be uploaded.

anark avatar Sep 10 '21 23:09 anark

Can you help me understand if this would solve a problem? You still need to upload the same amount of total chunks regardless of order.

Murderlon avatar Sep 13 '21 08:09 Murderlon

Sure, In my specific application I need to respect the order in which customers upload files. For example if they upload file A and then File B, I need file A to be uploaded before file B. Setting a limit of 1 allows this to work(as the next chunk of the currently uploaded file is upload each time), however this means that there is a separate call to prepareUploadParts for every single chunk instead of being able to do this in batches.

If I set the limit to a number larger than 1 then the chunks can be selected from different files and File B can complete before File A.

Ideally for our case we would be able to specify a larger chunk limit(for batch preparation), however limit the number of files being uploaded simultaniously to 1 to keep the order intact.

anark avatar Sep 13 '21 15:09 anark

Alright! I'm still wondering if it would be best to make this the new default, or that the current approach can have benefits in some scenarios.

Murderlon avatar Sep 14 '21 09:09 Murderlon

I don't think that a single file at a time should be the default, and I do think that the ability to limit the number of chunks batched at a time(the current approach) is valuable.

It would just help me(and hopefully others) if there was an additional option to upload the files in order (or one at a time with multiple chunks in each prepareUploadPart call).

I am not sure if this is needed by many or few, may be worth keeping this around to solicit if others need this as well before jumping to an implementation.

anark avatar Sep 14 '21 17:09 anark

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 16 '22 00:09 stale[bot]