cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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: 

How to cancel the uploading process in API V.2(C-Objective) ?

How to cancel the uploading process in API V.2(C-Objective) ?

comb
Explorer | Level 3

Hello,

 

In version API v.1 we have used the folowing APIs:

 

- (void)restClient:(DBRestClient *)client uploadedFileChunk:(NSString *)uploadId newOffset:(unsigned long long)offset (to send a larcge file)
[[self restClient] cancelAllRequests] (to cancel the uploading process)

 

In version API v.2 wa are using the folowing APIs:
uploadSession (to send a large file)


how to cancel the uploading process in the version API v.2?

 

Thanks in advance!

 

1 Accepted Solution

Accepted Solutions

Re: How to cancel the uploading process in API V.2(C-Objective) ?

Greg-DB
Dropboxer

The API v2 Objective-C SDK doesn't have a method like cancelAllRequests to cancel all active requests at once, but I'll be sure to pass this along as a feature request. 

 

When using upload sessions though, since you control how and when each portion is uploaded, you can have your app stop the upload session by stopping further calls.

 

And in any case, you can cancel an individual upload call (when using upload sessions or not) by calling cancel on the call object itself, like this:

 

DBUploadTask *req = [client.filesRoutes upload...
[req cancel];

(Note that there's a bug with that in 2.0.6, so you may want to use 2.0.5 for now to do this.)

View solution in original post

2 Replies 2

Re: How to cancel the uploading process in API V.2(C-Objective) ?

Greg-DB
Dropboxer

The API v2 Objective-C SDK doesn't have a method like cancelAllRequests to cancel all active requests at once, but I'll be sure to pass this along as a feature request. 

 

When using upload sessions though, since you control how and when each portion is uploaded, you can have your app stop the upload session by stopping further calls.

 

And in any case, you can cancel an individual upload call (when using upload sessions or not) by calling cancel on the call object itself, like this:

 

DBUploadTask *req = [client.filesRoutes upload...
[req cancel];

(Note that there's a bug with that in 2.0.6, so you may want to use 2.0.5 for now to do this.)

View solution in original post

Re: How to cancel the uploading process in API V.2(C-Objective) ?

Greg-DB
Dropboxer

The override issue in 2.0.6 is fixed now in version 3.0.0.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?