cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: 

File upload to dropbox timeout/pauses after certain time. Objective c SDK for dropbox.

File upload to dropbox timeout/pauses after certain time. Objective c SDK for dropbox.

SneYellow46
Explorer | Level 4

Hi,

We have an iOS objective c app with dropbox sdk integrated.

The app uploads large number of photos/files from local app storage to dropbox folder.

When we start the upload process it uploads almost 40-45 images/files for example and pauses the upload process after certain time.

We need to close the app and relaunch the app again so that the upload process starts again syncs the remaining files to the dropbox.

We are using following upload code specified in the dropbox documentation.

 

 

 

 

 

NSData *fileData = [@"file data example" dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];

// For overriding on upload
DBFILESWriteMode *mode = [[DBFILESWriteMode alloc] initWithOverwrite];

[[[client.filesRoutes uploadData:@"/test/path/in/Dropbox/account/my_output.txt"
                            mode:mode
                      autorename:@(YES)
                  clientModified:nil
                            mute:@(NO)
                  propertyGroups:nil
                       inputData:fileData]
    setResponseBlock:^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *networkError) {
      if (result) {
        NSLog(@"%@\n", result);
      } else {
        NSLog(@"%@\n%@\n", routeError, networkError);
      }
    }] setProgressBlock:^(int64_t bytesUploaded, int64_t totalBytesUploaded, int64_t totalBytesExpectedToUploaded) {
  NSLog(@"\n%lld\n%lld\n%lld\n", bytesUploaded, totalBytesUploaded, totalBytesExpectedToUploaded);
}];

 

 

 

 

 

 

Can you please let us know what could be the issues and is there any fix for this. 

 

10 Replies 10

Здравко
Legendary | Level 20

Take a look here for start a session possible variant (or here if you prefer data upload). Here you can see finalization for multiple sessions.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Здравко Legendary | Level 20
  • User avatar
    SneYellow46 Explorer | Level 4
What do Dropbox user levels mean?