cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

Javascript saver have no cancel option and the progress is not coming properly

Javascript saver have no cancel option and the progress is not coming properly

IrtezaAsad
New member | Level 2

Hello good people,
I'm using the dropbox saver in a NUXT application to save files to the user dropbox account after a certain task. There are some issues I'm facing while implementing this,

  • I didn't find an option to cancel the upload in the SDK.
    Sometimes the files are really big and we'd like to have a cancel option for the user for better experience. I see someone mentioned it's not there yet (here). Is it an upcoming feature? Can I somehow get notified if the feature is there?
  • For me the progress event () in the SDK says it'll return 0 to 1. But for me it's only returning 0 and 1. In some cases the progress 0 is not coming.
    progress: function (progress) {},

    For our user it'll help to see a progress percentage and for bigger files when the progress 0 is not coming in the UI it feels like the upload is "stuck" and it may confuse the users. Is there any option to get the exact trigger when the user clicks save in the dropbox window so I can show a loader to the users? And is there any way to get more progress events? (like 0, 0.3, 0.5, 1) 

My implementation 

 

 

const options = {
  success: () => {
    this.$emit('saved')
  },
  // Currently when the progress is 0 I'm starting the loader.
  progress: (progress) => {
    this.$emit('progress', progress*100)
  },
  cancel: () => {
    // showing the cancel alert
  },
  error: (errorMessage) => {
    // showing the error alert
  },
}

 

 

 

2 Replies 2

Greg-DB
Dropbox Staff

The Dropbox Saver doesn't offer a way to cancel an ongoing save job, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. I'll follow up here if/when I have any news on your feature request. (Note that the thread you linked to was actually about uploading via the JavaScript SDK for the Dropbox API, not the Saver, so this is a separate feature request.)

 

The Dropbox Saver progress callback is supposed to automatically report values between 0 and 1 when available, but it sounds like that may not be working correctly currently. We'll look into it and I'll follow up here with any updates.

Greg-DB
Dropbox Staff

The progress should now be getting reported properly again.

 

Note that progress will not be reported if the source URL does not return Content-Length.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?