Amplify-js: Batch Storage.put

Created on 20 Mar 2019  路  5Comments  路  Source: aws-amplify/amplify-js

* Which Category is your question related to? *
Storage

* What AWS Services are you utilizing? *
S3

* Provide additional details e.g. code snippets *
From https://aws-amplify.github.io/amplify-js/api/classes/storageclass.html#put, I am able to Storage.put to put 1 file to S3 at a time. I have a use case that users submit a few photos at a time, in which case I am looking for batch Storage.put alternative. Is this possible given what S3 currently provides?

Storage feature-request

Most helpful comment

The S3 service doesn't support it. Amplify could help a little or you could do something like:

const promises = [];
for(let file of files) {
  promises.push(Storage.put(file))
}

await  Promise.all(promises);

All 5 comments

Hi @YikSanChan

Currently this is not supported, I am labeling this issue as a feature-request.

@manueliglesias Is it not supported by S3 or only not supported by aws amplify?

The S3 service doesn't support it. Amplify could help a little or you could do something like:

const promises = [];
for(let file of files) {
  promises.push(Storage.put(file))
}

await  Promise.all(promises);

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.

@YikSanChan Since S3 does not support this currently, I am going to close this request out. Please try the workaround above. If you would like to open up a request with S3, please do so via S3 forums.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lucasmike picture lucasmike  路  3Comments

ldgarcia picture ldgarcia  路  3Comments

rygo6 picture rygo6  路  3Comments

guanzo picture guanzo  路  3Comments

josoroma picture josoroma  路  3Comments