We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Anonymous
9 years agoBest way to get a file's URL
I am making an iOS app that displays all of the images from a selected folder. To make caching the images easier and more efficient I'm using the SDWebImage Library. SDWebImage requires a URL and I'm...
- 9 years agoThat is the right way to get a direct link to a file using the API.
I'll be happy to pass along as feedback or feature requests though. What specifically would be more useful? Thanks in advance!
Pash237
8 years agoNew member | Level 2
I have exactly the same question, but I'm writing native iOS application in ObjC.
I searched, but can't find a way to get the temporary link for a file. I found mysterious `DBFILESGetTemporaryLink` and `DBFILESGetTemporaryLinkArg`, but I don't know how to use them.
I just need an external URL for a file in Dropbox — don't want to download it to a temporary location or data in memory.
Greg-DB
Dropbox Community Moderator
8 years agoPash237 In the Dropbox API v2 Objective-C SDK, you would use the DBFILESUserAuthRoutes -getTemporaryLink: method:
That's an RPC-style method, so it would be used the same way as the createFolder example here:
https://github.com/dropbox/dropbox-sdk-obj-c#rpc-style-request
(I.e., `[[client.filesRoutes getTemporaryLink...`)
- Pash2378 years agoNew member | Level 2
Thanks, it works!
[[client.filesRoutes getTemporaryLink:path]
setResponseBlock:^(DBFILESGetTemporaryLinkResult *result, DBFILESGetTemporaryLinkError *routeError, DBRequestError *networkError) {
if (result) {
NSLog(@"Got URL for Dropbox file: %@", result.link);
}
}];
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!