<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to implement  loadedFile method  in API V2 in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/228967#M12412</link>
    <description>&lt;P&gt;The documentation for this method can be found here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESUserAuthRoutes.html#/c:objc(cs)DBFILESUserAuthRoutes(im)uploadData:mode:autorename:clientModified:mute:inputData" target="_blank"&gt;https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESUserAuthRoutes.html#/c:objc(cs)DBFILESUserAuthRoutes(im)uploadData:mode:autorename:clientModified:mute:inputData&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From there, the first parameter (which is unnamed in the calling code) is the "path" parameter. That's the path in the&amp;nbsp;Dropbox account where you want to put the file when uploading it. For example, you could supply&amp;nbsp;&lt;SPAN&gt;"/RentTracker.sqlite".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The "inputData" parameter should be a&amp;nbsp;NSData object containing the actual data you want to upload.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jun 2017 20:25:48 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-06-23T20:25:48Z</dc:date>
    <item>
      <title>How to implement  loadedFile method  in API V2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/226042#M12322</link>
      <description>&lt;P&gt;Here is &amp;nbsp;my code , how to convert this &amp;nbsp;into &amp;nbsp;API v2 compitable methods.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;-(void)prepareForRecoverDB{
&amp;nbsp; &amp;nbsp; if(![Utility isNetworkAvailable]) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Utility showAlertViewWithTitle:@"Error!" Message:@"Unable to connect to the host. Please check your network connection." CancelTitle:@"OK"];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;
&amp;nbsp; &amp;nbsp; }
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; [self showLoadingView];
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; DBMetadata *mData = [self.arrOfBackupFiles objectAtIndex:self.indexPath_.row];
&amp;nbsp; &amp;nbsp; AppDelegate_Shared *appDelegate = (AppDelegate_Shared *)[UIApplication sharedApplication].delegate;
&amp;nbsp; &amp;nbsp; DBRestClient *aClient = [[DBRestClient alloc] initWithSession:[DBSession sharedSession]];
&amp;nbsp; &amp;nbsp; aClient.delegate = self;
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; NSString *strPath = [appDelegate dbPath];
&amp;nbsp; &amp;nbsp; NSArray *arrPath = [strPath componentsSeparatedByString:@"/"];
&amp;nbsp; &amp;nbsp; NSString *lastPath = [arrPath lastObject];
&amp;nbsp; &amp;nbsp; if([lastPath isEqualToString:mData.filename]){
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.restoredFileName = @"RentTracker.sqlite";
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [aClient loadFile:mData.path intoPath:[appDelegate dbPath:self.restoredFileName]];
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; else{
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [aClient loadFile:mData.path intoPath:[appDelegate dbPath:mData.filename]];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.restoredFileName = mData.filename;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; }
}
&amp;nbsp;
- (void)restClient:(DBRestClient*)client loadedFile:(NSString*)localPath {
&amp;nbsp; &amp;nbsp; [self hideLoadingView];
&amp;nbsp; &amp;nbsp; [Utility showAlertViewWithTitle:@"Restored!" Message:@"File Restored Sucessful!" CancelTitle:@"OK"];
&amp;nbsp; &amp;nbsp; [[DBSession sharedSession] unlinkAll];
&amp;nbsp; &amp;nbsp; AppDelegate_Shared *app = (AppDelegate_Shared *)[UIApplication sharedApplication].delegate;
&amp;nbsp;
&amp;nbsp; &amp;nbsp; NSFileManager *fm = [NSFileManager defaultManager];
&amp;nbsp; &amp;nbsp; [fm removeItemAtPath:[app dbPath] error:nil];
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; [[NSUserDefaults standardUserDefaults] setValue:self.restoredFileName forKey:kStoreName];
&amp;nbsp; &amp;nbsp; [[NSUserDefaults standardUserDefaults] synchronize];
&amp;nbsp;
&amp;nbsp; &amp;nbsp; app.managedObjectModel = nil;
&amp;nbsp; &amp;nbsp; app.managedObjectContext = nil;
&amp;nbsp; &amp;nbsp; app.persistentStoreCoordinator = nil;
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; [self.navigationController popViewControllerAnimated:YES];
}&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 09:21:33 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/226042#M12322</guid>
      <dc:creator>sdas</dc:creator>
      <dc:date>2019-05-29T09:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement  loadedFile method  in API V2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/226158#M12331</link>
      <description>&lt;P&gt;If you're using the &lt;A href="https://github.com/dropbox/dropbox-sdk-obj-c" target="_self"&gt;API v2 Objective-C SDK&lt;/A&gt; (which is recommended), the equivalent of the loadFile method would be any of the &lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESUserAuthRoutes.html#/c:objc(cs)DBFILESUserAuthRoutes(im)downloadUrl:overwrite:destination:" target="_self"&gt;download methods&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can find a sample of calling those here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-obj-c#download-style-request" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-obj-c#download-style-request&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As well as in the example app:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-obj-c/blob/master/Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/DBRoulette/PhotoViewController.m#L121" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-obj-c/blob/master/Examples/DBRoulette/iOS/CocoaPodsProject/DBRoulette/DBRoulette/PhotoViewController.m#L121&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2017 18:27:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/226158#M12331</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-06-16T18:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement  loadedFile method  in API V2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/228738#M12392</link>
      <description>&lt;P&gt;Hi, Greg&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;U&gt;&lt;STRONG&gt;while &amp;nbsp;i am downloading the file path of &amp;nbsp;sqlite database , it's actually returing nil and &amp;nbsp;in error part it showing&lt;/STRONG&gt;&lt;/U&gt; :-&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DropboxHttpError[{
&amp;nbsp; &amp;nbsp; ErrorContent = "path/not_found/..";
&amp;nbsp; &amp;nbsp; RequestId = 9c2085907ba4e2bda71a08d96d62af8b;
&amp;nbsp; &amp;nbsp; StatusCode = 409;
&amp;nbsp; &amp;nbsp; UserMessage = nil;
}];
&lt;/PRE&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&lt;U&gt;&lt;STRONG&gt;This is &amp;nbsp;my code for downloading data &amp;nbsp;from sqlite data path &lt;/STRONG&gt;&lt;/U&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;-----&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p5"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;-(void)prepareForRecoverDataBase
{
&amp;nbsp; &amp;nbsp; if(![Utility isNetworkAvailable]) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Utility showAlertViewWithTitle:@"Error!" Message:@"Unable to connect to the host. Please check your network connection." CancelTitle:@"OK"];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;
&amp;nbsp; &amp;nbsp; }
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; [self showLoadingView];
&amp;nbsp;&amp;nbsp; // NSString *filename = [self.arrOfBackupFiles objectAtIndex:self.indexPath_.row];
&amp;nbsp; &amp;nbsp; DBFILESFileMetadata *fileMetadata= [self.arrOfBackupFiles objectAtIndex:self.indexPath_.row];
&amp;nbsp; &amp;nbsp; AppDelegate_Shared *appDelegate = (AppDelegate_Shared *)[UIApplication sharedApplication].delegate;
&amp;nbsp; &amp;nbsp; NSString *strPath = [appDelegate dbPath];
&amp;nbsp; &amp;nbsp; NSArray *arrPath = [strPath componentsSeparatedByString:@"/"];
&amp;nbsp; &amp;nbsp; NSString *lastPath = [arrPath lastObject];
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; if([lastPath isEqualToString:fileMetadata.name]){
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.restoredFileName = @"RentTracker.sqlite";
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [appDelegate dbPath:self.restoredFileName];
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; else
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [appDelegate dbPath:fileMetadata.name];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.restoredFileName=fileMetadata.name;
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; NSLog(@"currentPath %@",[appDelegate dbPath:fileMetadata.name]);
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; DBUserClient *client = [DBClientsManager authorizedClient];
&amp;nbsp; &amp;nbsp; NSFileManager *fileManager = [NSFileManager defaultManager];
&amp;nbsp; &amp;nbsp; NSURL *outputDirectory = [fileManager URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask][0];
&amp;nbsp; &amp;nbsp; NSURL *outputUrl = [outputDirectory URLByAppendingPathComponent:fileMetadata.name];
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; [[[client.filesRoutes downloadUrl:fileMetadata.pathDisplay overwrite:YES destination:outputUrl]
&amp;nbsp; &amp;nbsp; &amp;nbsp; setResponseBlock:^(DBFILESFileMetadata *result, DBFILESDownloadError *routeError, DBRequestError *networkError,
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSURL *destination) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (result) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"%@\n", result);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSData *data = [[NSFileManager defaultManager] contentsAtPath:[destination path]];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSString *dataStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"%@\n", dataStr);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"%@\n%@\n", routeError, networkError);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; }] setProgressBlock:^(int64_t bytesDownloaded, int64_t totalBytesDownloaded, int64_t totalBytesExpectedToDownload) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"%lld\n%lld\n%lld\n", bytesDownloaded, totalBytesDownloaded, totalBytesExpectedToDownload);
&amp;nbsp; &amp;nbsp; &amp;nbsp; }];
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp;
&amp;nbsp; //&amp;nbsp; [self downloadData:[appDelegate dbPath:fileMetadata.name]];
&amp;nbsp; &amp;nbsp; [self hideLoadingView];
&amp;nbsp; &amp;nbsp; [Utility showAlertViewWithTitle:@"Restored!" Message:@"File Restored Sucessful!" CancelTitle:@"OK"];
&amp;nbsp; &amp;nbsp; //&amp;nbsp; &amp;nbsp; NSFileManager *fm = [NSFileManager defaultManager];
&amp;nbsp; &amp;nbsp; //&amp;nbsp; &amp;nbsp; [fm removeItemAtPath:[appDelegate dbPath] error:nil];
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; [[NSUserDefaults standardUserDefaults] setValue:self.restoredFileName forKey:kStoreName];
&amp;nbsp; &amp;nbsp; [[NSUserDefaults standardUserDefaults] synchronize];
&amp;nbsp;&amp;nbsp; &amp;nbsp;
//&amp;nbsp; &amp;nbsp; appDelegate.managedObjectModel = nil;
//&amp;nbsp; &amp;nbsp; appDelegate.managedObjectContext = nil;
//&amp;nbsp; &amp;nbsp; appDelegate.persistentStoreCoordinator = nil;
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; [self.navigationController popViewControllerAnimated:YES];
}&lt;/PRE&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 20:25:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/228738#M12392</guid>
      <dc:creator>sdas</dc:creator>
      <dc:date>2017-06-22T20:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement  loadedFile method  in API V2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/228739#M12393</link>
      <description>&lt;P class="p1"&gt;&lt;U&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;So i thought may be i had mistaken something during &amp;nbsp;uploading &amp;nbsp;the &amp;nbsp;data. &amp;nbsp;Below is the &amp;nbsp;code for uploading the &amp;nbsp;sqlite dataPath &amp;nbsp;to dropbox.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;U&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;DB Path-&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;U&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;Before adding time stamp&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;/var/mobile/Containers/Data/Application/6D7A6DDA-45D0-4509-99A5-E635891D9DB9/Documents/RentTracker.sqlite&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;U&gt;&lt;STRONG&gt;After adding time stamp&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;/var/mobile/Containers/Data/Application/AA188B71-1995-42A1-AC39-64AFD024E42A/Documents/RentTracker_IOS_01_02_2017_10_46_58.sqlite&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;So,what i am doing &amp;nbsp;is , converting the db file path into &amp;nbsp;data format &amp;nbsp;and &amp;nbsp;passing this &amp;nbsp;as &amp;nbsp;an input data [parameter], while &amp;nbsp;in uploadData [parameter], &amp;nbsp;i &amp;nbsp;sent &amp;nbsp; only the &amp;nbsp;file name . Please correct me , if i doing something wrong &amp;nbsp;in code . HELP ME !&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;Thank You&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;-(void)BackupData
{
&amp;nbsp;&amp;nbsp; // [[NSNotificationCenter defaultCenter]postNotificationName:kShowLoading object:self ];
&amp;nbsp;&amp;nbsp; // AppDelegate *Maindelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
&amp;nbsp; &amp;nbsp; [MBProgressHUD showHUDAddedTo:self.window animated:YES];
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; AppDelegate_Shared *appDelegate = (AppDelegate_Shared *)[UIApplication sharedApplication].delegate;
&amp;nbsp; &amp;nbsp; NSString *srcpath = [appDelegate dbPath]; &amp;nbsp;// returning the sqlite file path&amp;nbsp;
&amp;nbsp; &amp;nbsp;/* &amp;nbsp;Adding time stamp &amp;nbsp;*/&amp;nbsp;
&amp;nbsp; &amp;nbsp; NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
&amp;nbsp; &amp;nbsp; [formatter setDateFormat:@"MM_dd_yyyy_hh_mm_ss"];
&amp;nbsp; &amp;nbsp; NSString *dateStr = [formatter stringFromDate:[NSDate date]];
&amp;nbsp; &amp;nbsp; NSString *fileName = [NSString stringWithFormat:@"RentTracker_IOS_%@.sqlite", dateStr];
&amp;nbsp; &amp;nbsp; DBUserClient *client = [DBClientsManager authorizedClient];
&amp;nbsp; &amp;nbsp; NSData *fileData = [srcpath dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:NO];
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp;&amp;nbsp; // [client.filesRoutes uploadData:@"/" inputData:fileData]; //extra
&amp;nbsp; &amp;nbsp; // For overriding on upload
&amp;nbsp; &amp;nbsp; DBFILESWriteMode *mode = [[DBFILESWriteMode alloc] initWithOverwrite];
&amp;nbsp; &amp;nbsp; // [NSString stringWithFormat:@"/%@",fileName]
&amp;nbsp; &amp;nbsp; [[[client.filesRoutes uploadData: [NSString stringWithFormat:@"/%@",fileName]
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mode:mode
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; autorename:@(YES)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clientModified:nil
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mute:@(NO)
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inputData:fileData]
&amp;nbsp; &amp;nbsp; &amp;nbsp; setResponseBlock:^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *networkError) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (result) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"%@\n", result);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"stringPath of the file %@",result.pathDisplay);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[NSUserDefaults standardUserDefaults]setValue:result.pathDisplay forKey:@"path"];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[NSUserDefaults standardUserDefaults]synchronize];
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [MBProgressHUD hideHUDForView:self.window animated:YES];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Utility showAlertViewWithTitle:@"Backup!" Message:@"Backup was successful" CancelTitle:@"OK"];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [DBClientsManager unlinkAndResetClients];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"%@\n%@\n", routeError, networkError);
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [MBProgressHUD hideHUDForView:self.window animated:YES];
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; &amp;nbsp; }] setProgressBlock:^(int64_t bytesUploaded, int64_t totalBytesUploaded, int64_t totalBytesExpectedToUploaded) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSLog(@"\n%lld\n%lld\n%lld\n", bytesUploaded, totalBytesUploaded, totalBytesExpectedToUploaded);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }];
&amp;nbsp; &amp;nbsp; [formatter release]; formatter = nil;
&amp;nbsp;&amp;nbsp; &amp;nbsp;
}&lt;/PRE&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 20:26:15 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/228739#M12393</guid>
      <dc:creator>sdas</dc:creator>
      <dc:date>2017-06-22T20:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement  loadedFile method  in API V2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/228764#M12398</link>
      <description>&lt;P&gt;(I was writing this in response to your new messages, but it looks like you either deleted them or there's an issue with the forum not displaying them.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The '&lt;SPAN&gt;path/not_found' error indicates that there's nothing at the path you specified. When referencing paths in Dropbox, you should use the remote path, not the local path of the file. For example, if you uploaded a file named "RentTracker.sqlite" to root, the path you would need to download it would just be "/RentTracker.sqlite".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can get the paths of uploaded files by listing the contents of folders using the &lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESUserAuthRoutes.html#/c:objc(cs)DBFILESUserAuthRoutes(im)listFolder:" target="_self"&gt;listFolder methods&lt;/A&gt;. E.g., to list the root, supply the path as empty string "". (You can also manually check the contents of your own account on &lt;A href="https://www.dropbox.com/ " target="_self"&gt;the&amp;nbsp;Dropbox web site&lt;/A&gt;.) You should use the returned pathLower values to reference paths in other API calls.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note that if your app has the "app folder" permission, all of these paths will automatically be relative to the app's app folder (by default inside "/Apps". Your app doesn't need to add that manually though.)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 20:33:19 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/228764#M12398</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-06-22T20:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement  loadedFile method  in API V2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/228812#M12400</link>
      <description>&lt;P&gt;Hi Greg,&lt;/P&gt;
&lt;P&gt;Thanks for your valuable reply. As you suggested me to upload the root file path. &amp;nbsp;But i am still confused in uploading the data. so what should i &amp;nbsp;put in &amp;nbsp;&lt;STRONG&gt;uploadData:??&lt;/STRONG&gt; parameter &amp;nbsp;and &amp;nbsp;what should &amp;nbsp;be in&lt;STRONG&gt; inputData??&lt;/STRONG&gt; parameter. Thank You.&lt;/P&gt;
&lt;PRE&gt;[[[client.filesRoutes &lt;SPAN class="pl-c1"&gt;uploadData:&lt;/SPAN&gt;&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;@"???&lt;/SPAN&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;
                            &lt;SPAN class="pl-c1"&gt;mode:&lt;/SPAN&gt;mode
                      &lt;SPAN class="pl-c1"&gt;autorename:&lt;/SPAN&gt;@(&lt;SPAN class="pl-c1"&gt;YES&lt;/SPAN&gt;)
                  &lt;SPAN class="pl-c1"&gt;clientModified:&lt;/SPAN&gt;&lt;SPAN class="pl-c1"&gt;nil&lt;/SPAN&gt;
                            &lt;SPAN class="pl-c1"&gt;mute:&lt;/SPAN&gt;@(&lt;SPAN class="pl-c1"&gt;NO&lt;/SPAN&gt;)
                       &lt;SPAN class="pl-c1"&gt;inputData:???&lt;/SPAN&gt;]
    &lt;SPAN class="pl-c1"&gt;setResponseBlock:&lt;/SPAN&gt;^(DBFILESFileMetadata *result, DBFILESUploadError *routeError, DBRequestError *networkError) {
      &lt;SPAN class="pl-k"&gt;if&lt;/SPAN&gt; (result) {
        &lt;SPAN class="pl-c1"&gt;NSLog&lt;/SPAN&gt;(&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;@"&lt;/SPAN&gt;&lt;SPAN class="pl-c1"&gt;%@&lt;/SPAN&gt;&lt;SPAN class="pl-cce"&gt;\n&lt;/SPAN&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;, result);
      } &lt;SPAN class="pl-k"&gt;else&lt;/SPAN&gt; {
        &lt;SPAN class="pl-c1"&gt;NSLog&lt;/SPAN&gt;(&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;@"&lt;/SPAN&gt;&lt;SPAN class="pl-c1"&gt;%@&lt;/SPAN&gt;&lt;SPAN class="pl-cce"&gt;\n&lt;/SPAN&gt;&lt;SPAN class="pl-c1"&gt;%@&lt;/SPAN&gt;&lt;SPAN class="pl-cce"&gt;\n&lt;/SPAN&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;, routeError, networkError);
      }
    }] &lt;SPAN class="pl-c1"&gt;setProgressBlock:&lt;/SPAN&gt;^(&lt;SPAN class="pl-c1"&gt;int64_t&lt;/SPAN&gt; bytesUploaded, &lt;SPAN class="pl-c1"&gt;int64_t&lt;/SPAN&gt; totalBytesUploaded, &lt;SPAN class="pl-c1"&gt;int64_t&lt;/SPAN&gt; totalBytesExpectedToUploaded) {
  &lt;SPAN class="pl-c1"&gt;NSLog&lt;/SPAN&gt;(&lt;SPAN class="pl-s"&gt;&lt;SPAN class="pl-pds"&gt;@"&lt;/SPAN&gt;&lt;SPAN class="pl-cce"&gt;\n&lt;/SPAN&gt;&lt;SPAN class="pl-c1"&gt;%lld&lt;/SPAN&gt;&lt;SPAN class="pl-cce"&gt;\n&lt;/SPAN&gt;&lt;SPAN class="pl-c1"&gt;%lld&lt;/SPAN&gt;&lt;SPAN class="pl-cce"&gt;\n&lt;/SPAN&gt;&lt;SPAN class="pl-c1"&gt;%lld&lt;/SPAN&gt;&lt;SPAN class="pl-cce"&gt;\n&lt;/SPAN&gt;&lt;SPAN class="pl-pds"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;, bytesUploaded, totalBytesUploaded, totalBytesExpectedToUploaded);
}];&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 05:08:58 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/228812#M12400</guid>
      <dc:creator>sdas</dc:creator>
      <dc:date>2017-06-23T05:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement  loadedFile method  in API V2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/228967#M12412</link>
      <description>&lt;P&gt;The documentation for this method can be found here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESUserAuthRoutes.html#/c:objc(cs)DBFILESUserAuthRoutes(im)uploadData:mode:autorename:clientModified:mute:inputData" target="_blank"&gt;https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBFILESUserAuthRoutes.html#/c:objc(cs)DBFILESUserAuthRoutes(im)uploadData:mode:autorename:clientModified:mute:inputData&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From there, the first parameter (which is unnamed in the calling code) is the "path" parameter. That's the path in the&amp;nbsp;Dropbox account where you want to put the file when uploading it. For example, you could supply&amp;nbsp;&lt;SPAN&gt;"/RentTracker.sqlite".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The "inputData" parameter should be a&amp;nbsp;NSData object containing the actual data you want to upload.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 20:25:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-implement-loadedFile-method-in-API-V2/m-p/228967#M12412</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-06-23T20:25:48Z</dc:date>
    </item>
  </channel>
</rss>

