We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Gavin O.2
11 years agoNew member | Level 1
Link to files/folder - not sharing
Hello again team,
I'm attempting to write an app that will send people links to items within their Dropbox files and folders.
This app makes use of the delta/metadata endpoints to discover files and folders.
I'm going through your documentation and I'm struggling to find any documented way of constructing URLs to deep link into a Dropbox account.
I see I can create shared links for the purpose of sharing but I don't want to create new links with their own security implications - I just want to provide app users with links to their own Dropbox content in the Dropbox web portal - and secured by the web portal.
Looking closer into the portal I see that I can construct URLs to deep link into a folder that look like this:
https://www.dropbox.com/home/<path>
Is this a supported mechanism for apps to do this?
- Are there any gotchas / dropbox features that would make this a bad idea?
- Is there a preferred way of doing this?
- How about linking to files?
I did also notice that your windows desktop client makes use of a dropbox.com API to provide the link via a redirect:
https://www.dropbox.com/c/browse/<path>?<query>
- Is this a supported API?
- Can I construct those URLs from the information provided in the /metadata API?
Any guidance on how I might go about doing this would be greatly appreciated.
15 Replies
Replies have been turned off for this discussion
- Steve M.11 years ago
Dropbox Staff
Unfortunately, we don't have a way to hotlink to a file on dropbox.com, but we'll consider this as a feature request.
Things to watch out for if you try to just do "/home/..." is that Dropbox for Business users may have different paths, depending on whether they've linked a work and personal account (and then the path depends on which account is being used).
- NCP D.11 years agoNew member | Level 1
Steve, thanks for your response.
The scenario you describe between linked work and personal accounts is one I hadn't considered, I will look further into this.
Is there a way to detect the correct path today?
Additionally, I would ask if this is something I should do?
eg: if this is not currently a supported use-case for dropbox.com then I can't really build an app that relies on this, right?
Thanks again
- Steve M.11 years ago
Dropbox Staff
I can't think of a reliable way to figure out the path today. Agreed that it's probably not a great idea to build an app that relies on this (since you're unlikely to be able to get it 100% correct today, and we may end up breaking things later).
- NCP D.11 years agoNew member | Level 1
Thanks Steve, I appreciate your openness.
Please do consider deep linking into both files and folders on dropbox.com a feature request :-)
- L. Kelvin11 years agoNew member | Level 1
Yes, accessing file/folder with direct link is need. As my web hosting has limited storage for me and now looking for other storage solution, if it works, I think Dropbox will be alternative web storage with a web hosting.
Best regards,
Kelvin.
- Dag B.111 years agoNew member | Level 2
I would like to second this request for linking. This is something our app would benefit from!
Best regards,
Dag.
- Craig L.1511 years agoNew member | Level 2
I am also looking for a method to deep link to a file. Just not on the website - but on the desktop.
Scenario.
We are 3 users, and we use Wunderlist (and Gmail, and other apps)
I would love to attach files to an Task, Email etc that will open up the file or location in the Desktop Application.
The problem is our shared folders all live in different local path locations.
eg.
User 1, has a Mac so the path is \usr\dropbox\sharedfoldersX\sharedfolder1\subfolder\file.txt
User 2, has a PC and the path is C:\Users\dropbox\sharedfoldersY\sharedfolder1\subfolder\file.txt
User 3, has a PC and the path is D:\dropbox\sharedfolder1\subfolder\file.txt
So there is no clean way to give a Local File Path easily.
We currently share it like this
\sharedfolder1\subfolder\file.txt
But that is a pain to get, especially on a Mac.
If the App could work this out, like this.
file.txt has ID 44444
User 1 clicks dropbox.com\?openlocation=44444
It Either Opens the file on the local system (as it knows the location as per above)
OR dropbox.com\?openlocation=44444&dir=yes
Opens location in Finder/ File Explorer
\usr\dropbox\sharedfoldersX\sharedfolder1\subfolder\
So dropbox.com\openlocation= is a Webhook to open the Desktop Application, if it is not there, it opens the Web location.
That would be super helpful and maintain file integrity across applications like Task lists and Email :)
Kinda like a "Share with Colleague" button in the Context menu.
- Lucben10 years agoHelpful | Level 7
Any progress on this? Badly needed. Someone posted the recommendation to modify the link url by using "dl." instead of "www." but I am not sure whether that is a reliable long term URL or things might break at some point?
- Greg-DB10 years ago
Dropbox Community Moderator
No update on deep links like this.
(The URL transformation you're referring to only applies to shared links, as a way to control the behavior of the shared link itself. The officially documented way to do that is found here: https://www.dropbox.com/help/201 ) - Lucben9 years agoHelpful | Level 7
Thank you Greg, actually what I need is not exactly that. I need the image to be loaded in the browser alone. If I replace the "www" with "dl" at the beginning of the shared URL and then remove anything following the file extension, it seems to work.
I was just wondering if it's going to be a good idea in the long term, because maybe things might change over time?
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!