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.

Cancel an upload request

See original GitHub issue

Hello,

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:open
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bymoecommented, May 31, 2020

I think this is an important issue, Hope to get some news soon.

0reactions
greg-dbcommented, Jun 1, 2020

@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.

Read more comments on GitHub >

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

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