How to cancel Storage file upload
See original GitHub issueI cannot find it anywhere in Amplify Storage Documantation, but is there a way to cancel file upload (put) ? It will be useful to give user possibility to cancel upload of files.
I’m using Storage.put like so:
return Storage.vault.put(filename, buffer, {
metadata,
progressCallback (e) {
// log progress
}
})
but all I get is Promise, which I cannot cancel simply by js.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:13 (3 by maintainers)
Top Results From Across the Web
5 Free Ways to Stop Google Drive Upload in Progress Efficiently
To stop Google Drive uploading completely, you can go to the Google Drive page and click Google account in the upper right corner...
Read more >Firebase Android: File upload cancellation - Stack Overflow
I just used the storageRef as an example. But you're right, it will delete all your files. You should use storagetRef.child(pictureRefName).
Read more >How to cancel or stop sync in OneDrive - Microsoft Support
To cancel an upload to the OneDrive website · On the top toolbar, select OneDrive upload icon Uploading to show the Progress of...
Read more >Storage - Cancel requests - JavaScript - AWS Amplify Docs
You may cancel any put , get , or copy requests made by the Storage API by keeping a reference to the promise...
Read more >How do I cancel uploading to iCloud Drive - Apple Community
It's still uploading, and of course it's interfering with the syncing of small files for work. Can't tell which is being uploaded, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sammartinez I would open this one again, because API.cancel() as mentioned here has not solved this issue.
But feature is very needed! In my app (but I suspect in any app), user may start to upload a huge file by mistake and there is no workaround to cancel it
@pippo111 - I do not believe this is supported at the moment; I will mark this as a feature request.