Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8957237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:56:30+00:00 2026-06-15T14:56:30+00:00

I am using dropbox to upload and download shared files from the dropbox account.

  • 0

I am using dropbox to upload and download shared files from the dropbox account. this means that every user is able to download the latest version of the file, modify it, and re-upload it, substituting the one before. If there is a stable internet connection, this process works, but if the internet is not responding, the file will be corrupted, and a version of the file that is not complete will be uploaded. This will damage all the users. Is there a way to check if there is a stable internet connection with the dropbox servers? I tried reachability, but it only controls internet connection, not dropbox servers responding.

The code for the error:

- (void)restClient:(DBRestClient*)client uploadFileFailedWithError:(NSError*)error {
NSLog(@"File upload failed with error - %@", error);

UIAlertView *alert1 = [[UIAlertView alloc] initWithTitle:@"Offline mode" message:@"Your event is going to be posted when you create a new event." delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles: nil];
[alert1 show];

 }

The point is that even if this function is called, the file is still uploaded on the internet!

Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:56:31+00:00Added an answer on June 15, 2026 at 2:56 pm

    To check if your account is linked with dropbox use this .[[DBSession sharedSession] isLinked] that returns a BOOL value

        if ([[DBSession sharedSession] isLinked]) {         
           // write your code here..
       }
    

    and then to restore your file to previous version ..

    For that you just have to understand them clearly

    1. you have to load the revisions of the file, that you are going to restore.
      for that you can use either one of these method

    Obtains metadata for the previous revisions of a file.
    Only revisions up to thirty days old are available.

    /* Loads a list of up to 10 DBMetadata objects representing past revisions of the file at path */
    - (void)loadRevisionsForFile:(NSString *)path;
    
    /* Same as above but with a configurable limit to number of DBMetadata objects returned, up to 1000 */
    - (void)loadRevisionsForFile:(NSString *)path limit:(NSInteger)limit;
    

    for example :
    [[self restClient] loadRevisionsForFile:@”YourFile” limit:10];

    and these delegate methods from where you can get the array of revisions values for your file

    - (void)restClient:(DBRestClient*)client loadedRevisions:(NSArray *)revisions forFile:(NSString *)path;
    - (void)restClient:(DBRestClient*)client loadRevisionsFailedWithError:(NSError *)error;
    

    for example:

    - (void)restClient:(DBRestClient*)client loadedRevisions:(NSArray *)revisions forFile:(NSString *)path {
    
        NSArray  *dbRevisionsArray = revisions;
    }
    - (void)restClient:(DBRestClient*)client loadRevisionsFailedWithError:(NSError *)error{
    
        [[[UIAlertView alloc] initWithTitle:@"Oops!!!" message:@"Please try again." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] show];
    }
    

    So now you have array of metadata of previous revisions of your file.

    1. To restore the file [About Restore],

    Here there are two cases:

    Case 1: is to restore the file in Dropbox
    (here you have restored the file only in the Dropbox, to have your restored file in your APP, you have to load the file again to you Database as usual)

    Case 2: is to restore the file in your DataBase (*here You can restore your
    file only in App’s Database but not in Dropbox, To restore in Dropbox follow Case 1: *)

    Case 1: Restore the file in Dropbox

    // Restores a file at path as it existed at the given rev and returns the metadata of the restored file after restoration

     - (void)restoreFile:(NSString *)path toRev:(NSString *)rev;
    

    // and their delegate methods

     - (void)restClient:(DBRestClient*)client restoredFile:(DBMetadata *)fileMetadata;
     - (void)restClient:(DBRestClient*)client restoreFileFailedWithError:(NSError *)error;
    

    for example:

           DBMetadata *metaData = [dbRevisionsArray objectAtIndex:row];
          NSString *revStr = metaData.rev;
    [[self restClient] restoreFile:@"yourFilePath" toRev:revStr];
    

    then Load the file to your database path..

    that’s it ,.

    Case 2: Restore file only in App’s Database (Not in Dropbox)

    /* This will load a file as it existed at a given rev */

    - (void)loadFile:(NSString *)path atRev:(NSString *)rev intoPath:(NSString *)destPath;
    
    - (void)restClient:(DBRestClient*)client loadedFile:(NSString*)destPath contentType:(NSString*)contentType metadata:(DBMetadata*)metadata;
    - (void)restClient:(DBRestClient*)client loadFileFailedWithError:(NSError*)error;
    

    for example: [[self restClient] loadFile:@"yourFile" atRev:revStr intoPath:toYourDatabasePath];

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Apache HTTP components (4.1-alpha2) to upload a files to dropbox. This
I'm trying to upload an image to dropbox. I'm using the latest version of
i am trying to download files using getFileStream() in dropbox api but it returns
I am trying to upload files to dropbox in app I am making that
ORIGINAL I'm having problems to upload a file (image) to Dropbox from Node.js using
I'm using the DropBox API (Ruby) to allow users to browse their DropBox folders/files
I'm trying to upload an edited version of a .txt file to Dropbox using
I'm looking for a technology that can be used to upload large (~2GB) files
How can I upload a photo to DropBox using iOS DropBox SDK. I have
I notice that the Dropbox iOS app allows you to set the Upload Quality

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.