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: 

V2 Obj-C equivalent to [DBFilesystem sharedFilesystem].status.anyInProgress

V2 Obj-C equivalent to [DBFilesystem sharedFilesystem].status.anyInProgress

Steve L.
Helpful | Level 6

Is there a V2 Obj-C equivalent to the Sync API [DBFilesystem sharedFilesystem].status.anyInProgress ?

 

That is,  how can I test if there are uploads in progress after fileRoutes batchUploadFiles is called but before the responseBlock is run?

7 Replies 7

Greg-DB
Dropbox Staff
Hi Steve, no, unfortunately the SDK doesn't offer anything analogous to status.anyInProgress, but I'll be sure to pass this along as a feature request. You'll need to keep track of this state via your app's logic instead. (I.e., set some state when kicking off the operation, and unset it when the response block runs.)

Steve L.
Helpful | Level 6

 Thanks Greg.

 

The specific situation I'm trying to accommodate is where a user repeatedly changes a file (e.g. editing an online document or cropping a photo).  Is it sufficient to just call fileRoutes batchUploadFiles repeatedly and the document at Dropbox reflects the last invocation?  Or do I need to add logic to queue repeated updates to the same document?

Greg-DB
Dropbox Staff
The exact behavior in that case would depend on which of the calls succeed first, and what write mode you're using, so it would be safer to queue these up in order.

Steve L.
Helpful | Level 6

The asynchronous and non-deterministic nature of the API will make that (ahem) "interesting".

 

One final question: do you know of any situation (apart from the app terminating) where the responseBlock in a fileRoutes batchUploadFiles API call will fail to run?  

Greg-DB
Dropbox Staff
There are some complications around background sessions. You can find more information about that here:

https://github.com/dropbox/dropbox-sdk-obj-c#note-about-background-sessions

Stephen C.14
Dropbox Staff

Steve, an `uploadsInProgress` method has been added to the batch upload logic in the latest version of the SDK. Let us know if you have any problems with it.

Steve L.
Helpful | Level 6

Thanks Stephen.  I plan to use it to detect if a background batch upload session has abnormally terminated for any reason (unlikely, but it can happen).  If that occurs I can re-initiate the batch upload.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Steve L. Helpful | Level 6
  • User avatar
    Stephen C.14 Dropbox Staff
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?