One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
AdamWolfy
5 years agoExplorer | Level 3
Dropbox download to an absolute URL
Is there a way to get an absolute URL of an image after it's been downloaded using the filesDownload function in the JavaScript, I'm also using Node.js and Discord.js, I'm currently trying to download an image from my Dropbox directory and then send it to a Discord channel which only allows for absolute URLs to send images as attachments.
I realise I can use the response.fileBinary to get the data of the image, is there a way to then save this to the server it's running on using the command "node ." and then locate that image on the server which I can then send.
- Greg-DB
Dropbox Staff
The filesDownload method in the Dropbox API v2 JavaScript SDK is just a way to retrieve the file data from the Dropbox servers, and doesn't itself interact with your local filesystem. You can access the file data via the fileBinary property like you mentioned, and from there you can do whatever you need with the data, such as saving it to the local filesystem, etc.
For instance, here's an example that shows how you could save the downloaded file data from a download-style request (filesDownload works the same way) to the local file system using fs.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 5 days ago
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!