Cancel an upload request
See original GitHub issueHello,
I used Dropbox Javascript API, for uploading files. Here is my code :
let promise = this.dropbox.filesUpload({path: path + file.name, contents: file})
.then(function(result)
{
// Success workflow goes here ...
})
.catch(function(error) {});
I would like to implements a cancel button. When I clicked it, I would like to my promise
request above was aborted.
I read this trick #159 but how can implement it directly with Dropbox JS SDK ?
I also find this way for cancelling fetch request with the AbortController.abort()
: https://stackoverflow.com/questions/31061838/how-do-i-cancel-an-http-fetch-request
but it’s not possible pass fetchOptions
in Dropbox.filesUpload()
method.
Does anyone have a solution for this issue ? Thanks you in advance !
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Cancel File Upload Post request using Axios - Stack Overflow
Basically, you need to pass a canceltoken in the config object while using axios.post and when you want to cancel, you can call...
Read more >File Upload with cancel button and progress bar In ReactJS
In this video, we will build the cancelable file upload. Basically, you can cancel any Axios request with this method.File Upload with ...
Read more >How to properly cancel a file uploading request?
uploading request. It works just fine. By using req.client.destroy() or res.connection.destroy(), the browser stops uploading immediately.
Read more >Is there way to cancel/abort upload request? #126 - GitHub
Hey I actually managed to solve this problem a while ago, so here's my solution. import axios from 'axios'; import ...
Read more >How to Upload Multiple File With Feature Cancellation & Retry ...
First thing first, please use the data structure as same as the part 1 article. The main tools that we use for the...
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
I think this is an important issue, Hope to get some news soon.
@ImSolitude Thanks for the feedback. I don’t have any news on this right now, but I’ll follow up here if/when I do. I can’t make any promises or offer a timeline though.