We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

David W.136's avatar
David W.136
Helpful | Level 6
10 years ago

n00b-iest question ever: What url is the Saver parameter referring to?

I've registered an app that I run off of localhost. I have gotten the Chooser to work. But the only way I can get the saver to not give me a 403 error is to use as its parameter the dropbox url that Chooser returns to me when I download a file. That URL is of the form www.dropbox.com/s/fjdksdlgadasdgflkj/file%20name.txt

But suppose I want to upload a new file from my host that I didn't download through the Chooser. I'd expect such a file to have an url such as http://localhost/somefolder/filename.txt.

1. Is it possible to use Saver to upload a new file? Is there some trick to the URL that I'm not getting.

2. While I'm here, what I'd really like is the ability to get the the pathname of an existing file in my Dropbox folder. E.g., Dropbox/ImportantFiles/filename.txt. Is there any way to get that instead of the hashed path expressed in the URL that Chooser shows me? (Yes, this is a totally different question. But if I could get the pathname, I could use the Dropbox API to enable JavaScript to browse a mirror of my hard drive -- a holy grail for us localhosters.)

Thanks for your help. And, yes, I am embarrassed.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    1. The URL given to the Saver is supposed to be a URL of a file that will be saved to the end user's Dropbox account. The Saver won't be able to download from a localhost URL though. The URL you supply to the Saver is sent off to the Dropbox servers to download, which can't access your local machine and the file it is serving locally, since it's not available on the Internet. The URL you supply to the Saver needs to be accessible on the Internet, like the Dropbox link sample you gave (but it doesn't need to be hosted on Dropbox of course).

    2. If you want to get the original file path from a Chooser link, that is possible via the API if you have the right user linked. This was recently covered here:

    https://www.dropboxforum.com/hc/en-us/community/posts/203299509-How-to-get-the-file-path-from-a-preview-link-

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 5 hours ago
325 Following

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!