You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
ABDUL Salam
2 years agoExplorer | Level 3
How to Use Dropbox API to Organize and Save Files from External URLs?
Hello Forum Members,
I have a project where I receive public URLs of files, and I need to save these files to a specific folder structure in Dropbox. The folder structure in Dropbox should be o...
- 2 years ago
Dropbox does offer an API endpoint /2/files/save_url which allows you to specify a particular URL to a file and a path where you'd like to save that file in the connected Dropbox account. You can supply the public URL, and programmatically build the desired destination path in your code.
By the way, that's a link to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible. Those have corresponding native methods for the HTTPS endpoints.
That sounds like that would work for your use case, so I suggest trying that out. The API Explorer is a good way to test and prototype calls like this.
Greg-DB
Dropbox Staff
Dropbox does offer an API endpoint /2/files/save_url which allows you to specify a particular URL to a file and a path where you'd like to save that file in the connected Dropbox account. You can supply the public URL, and programmatically build the desired destination path in your code.
By the way, that's a link to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible. Those have corresponding native methods for the HTTPS endpoints.
That sounds like that would work for your use case, so I suggest trying that out. The API Explorer is a good way to test and prototype calls like this.
ABDUL Salam
2 years agoExplorer | Level 3
Hi Greg,
Your previous response helped me a lot in addressing my requirement, thanks for that. Also, I was curious if a file saved already exists using this endpoint, then it updates the name and appends it with a counter filename(1)? Is there any possibility to completely override the file if it already exists?
- Greg-DB2 years agoDropbox Staff
ABDUL Salam No, unfortunately the /2/files/save_url endpoint doesn't offer "write mode" options, e.g., to overwrite an existing file at the specified location, like /2/files/upload does. I'll pass this along as a feature request, but I can't promise if or when that might be implemented.
- ABDUL Salam2 years agoExplorer | Level 3
Thank you, Greg-DB, for your prompt response. I greatly appreciate your willingness to consider this as a feature request, as it has the potential to provide significant benefits in numerous use cases.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,915 PostsLatest Activity: 6 years agoIf 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!