question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to cancel Storage file upload

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

12reactions
sorokinvjcommented, Jul 8, 2020

@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

7reactions
haverchuckcommented, Apr 16, 2019

@pippo111 - I do not believe this is supported at the moment; I will mark this as a feature request.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found