You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
sdas
8 years agoExplorer | Level 3
How to implement loadedFile method in API V2
Here is my code , how to convert this into API v2 compitable methods.
-(void)prepareForRecoverDB{
if(![Utility isNetworkAvailable]) {
[Utility showAlertViewWithTitle:@"Error!...
- 8 years ago
If you're using the API v2 Objective-C SDK (which is recommended), the equivalent of the loadFile method would be any of the download methods.
You can find a sample of calling those here:
https://github.com/dropbox/dropbox-sdk-obj-c#download-style-request
As well as in the example app:
Greg-DB
Dropbox Staff
(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.)
The '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".
You can get the paths of uploaded files by listing the contents of folders using the listFolder methods. E.g., to list the root, supply the path as empty string "". (You can also manually check the contents of your own account on the Dropbox web site.) You should use the returned pathLower values to reference paths in other API calls.
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.)
sdas
8 years agoExplorer | Level 3
Hi Greg,
Thanks for your valuable reply. As you suggested me to upload the root file path. But i am still confused in uploading the data. so what should i put in uploadData:?? parameter and what should be in inputData?? parameter. Thank You.
[[[client.filesRoutes uploadData:@"???" mode:mode autorename:@(YES) clientModified:nil mute:@(NO) inputData:???] 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); }];
- Greg-DB8 years agoDropbox Staff
The documentation for this method can be found here:
From there, the first parameter (which is unnamed in the calling code) is the "path" parameter. That's the path in the Dropbox account where you want to put the file when uploading it. For example, you could supply "/RentTracker.sqlite".
The "inputData" parameter should be a NSData object containing the actual data you want to upload.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,919 PostsLatest Activity: 15 hours ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!