Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Electrify2015
9 years agoExplorer | Level 4
Save files to dropbox using the save file function
Hi,
Today i saw this feature that allow a user to just click a button to save the file to the dropbox account. So i was thinking in taking advantage of this feature by creating a page were i just type the direct location on a input field and after pressing the button the file gets transfered.
I have tried diferent techniques after reading the developers documentation but without any luck. there is a problem with file location or it doesn't work.
Any comments or help this
Thanks
14 Replies
Replies have been turned off for this discussion
- Electrify20159 years agoExplorer | Level 4I notice that your share button below my post is similar what i'm trying to achieve but in this case the location is custom for each file i want to transfer to my dropbox account.
- Greg-DB9 years ago
Dropbox Community Moderator
It sounds like you'd be interested in using the Dropbox Saver. You can find the full documentation and instructions for using that here:
https://www.dropbox.com/developers/saver
If that's not working for you, I'll be happy to help, but I'll need some more information. In that case, please reply with:
- the full text of the error/any output
- the relevant code snippet(s) - Electrify20159 years agoExplorer | Level 4Hi, have tried diferent ways to build it without any luck. All i want is a simple html form that when i click on it the file gets saved in the logged in dropbox account.
I'm getting this error:
{"error": "Invalid origin"}
Do you have a full path to send a get or post request and save the file.
Thanks - Greg-DB9 years ago
Dropbox Community Moderator
Are you trying to run the Saver from a file:// URL by any chance? That can result in that error.
When using the Chooser or Saver, you'll need to run it from a server, so that Dropbox can verify the domain. (That is, since you need to pre-register the domains you'll user your Chooser or Saver on via the App Console: https://www.dropbox.com/developers/apps )
Try running it from a server instead. (You can even use a localhost server while developing it.) - Electrify20159 years agoExplorer | Level 4
I tried a localhost http server and didn't work either. I did add http://127.0.0.1 and localhost on the app section on the dropbox site.
I get the following error:{"error": "Origin does not match any app domain"} - Greg-DB9 years ago
Dropbox Community Moderator
The domain for the URL of the page you host the Saver needs to exactly match one of your pre-registered Chooser/Saver domains. (Make sure you don't register an "OAuth 2 redirect URI", as that's not for the Chooser/Saver.)
So, for example, register "localhost" and then access your page from http://localhost (plus whatever port and path you need). - Electrify20159 years agoExplorer | Level 4
This was what i was trying to build but it doesn't work. I get the file value but when executing it! It open the the image.
<form> <input type="text" id="file_id" value="https://dl.dropboxusercontent.com/s/deroi5nwm6u7gdf/advice.png"><br> <input type="submit" value="Send!" onclick="send()"> </form> <script> send = function() { var file_id = document.getElementById('file_id').value; document.write('<a href="'+file_id+'" class="dropbox-saver">123</a>'); } </script> - Greg-DB9 years ago
Dropbox Community Moderator
I'm not sure I understand your question. It looks like you already have the Dropbox link at this point in the code though. If you need general HTML/JavaScript help, I'm afraid I can't be of use, as that wouldn't be about Dropbox itself. You may want to post on a general help forum, such as StackOverflow. - Electrify20159 years agoExplorer | Level 4
OK, Thanks
- huasa7 years agoExplorer | Level 3
Hi,I had tried use dropbox choose and saver successfully,but it happen some issue when I use saver to save file which file name or url have chinese characters ,I console the error and I get "Invalid host".Whether the saver could't save the file name or url with chinese characters?
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!