Amplify-js: How to cancel Storage file upload

Created on 15 Apr 2019  路  7Comments  路  Source: aws-amplify/amplify-js

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.

Storage feature-request

Most helpful comment

@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

All 7 comments

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

@haverchuck Any news on that ? It is getting really problematic, when internet connection breaks and user is unable to cancel his upload. Is there any way to do it maybe via some lower level API ? Any hints on that ?

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.

Any idea when this might be supported ?

Will a cancel feature be added???

@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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rayhaanq picture rayhaanq  路  3Comments

ddemoll picture ddemoll  路  3Comments

rygo6 picture rygo6  路  3Comments

guanzo picture guanzo  路  3Comments

romainquellec picture romainquellec  路  3Comments