We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
datan3rd
8 years agoExplorer | Level 3
Download not able to find file when exists
Building an app using xcode and objective c. I have been able to successfully get my backup sqlite file to upload but when attempting to use a download I am getting an error saying the file could ...
- 8 years ago
I see, thanks for sharing the output. This error isn't actually reporting an issue with the remote path (indeed "/backups/mydatabase.sqlite" looks correct) but rather with the local path for the downloaded file.
What version number of the SDK do you have installed? There were some bugs like this previously, but they should be resolved in the latest versions. If you're not already using the latest version (currently v.3.9.2) please update and try again.
Greg-DB
Dropbox Community Moderator
8 years ago[Cross-linking for reference: https://stackoverflow.com/questions/53815606/objective-c-dropbox-sdk-v2-downloading-file-not-found ]
When referencing files by path using the Dropbox API, the path should be relative to whatever root your app has. For instance, if your app is registered for the "app folder" permission, its root is the app folder itself. That means you don't need to specify the path to the app folder, as that's handled automatically.
So, for instance, if you can see the file on the Dropbox web site under 'Apps > MyAppName > SomeFolderName > file.ext', to download that file via the API using your app folder app, you would supply just "/SomeFolderName/file.ext".
Preferrably though, you would just use the value supplied by the API itself. For instance, if you successfully upload a file, the upload method will return the metadata for the uploaded file. You can use the DBFILESMetadata.pathLower value directly as the path value elsewhere, such as when downloading the file again later.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!