One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
Ganelon
3 years agoNew member | Level 2
On Sharing images and email...
Hello!
I have a webapp that I have integrated Dropbox API in (python).
This allows the user of the app to 'attach' files to a specific scope. The scope determines the folder structure in the Dropbox Apps folder.
As the user adds images, we create a database entry for the image with the dropbox id and the scope used for local referencing.
Once added, we use the file.id to lookup the file path, which is used for the other api methods.
When our 'attachments browser' is opened, we load the relevant local images data into a grid display. If they select an image on the grid, I get a TempLink for that image id and use it to preview the image in an HTML cell. My understanding is the TempLink last for 4 hours.
I've tried to implement an embedded email using SharedLink with setting in the API, but the link I receive does not seem to be able to be used for an embed(only an 'a href', even though the 4 hour TempLink can be used as such. My ultimate goal is to have the user of this webapp have a Business level account, where I can use expiring Shared Links with a 2 day expiration.
Is anyone else using dropbox images in email embeds, and if so... what direction did you settle on with facilitating that.
Unlike the direct temporary links, shared links do not refer directly to the file data. They actually refer to an HTML preview page for the file. That being the case, attempting to embed the file data somewhere using a shared link will fail (because the returned data is the HTML for the web page, not the file data). You can modify these links for direct access though, as covered here: https://help.dropbox.com/files-folders/share/force-download
- Greg-DB
Dropbox Staff
Unlike the direct temporary links, shared links do not refer directly to the file data. They actually refer to an HTML preview page for the file. That being the case, attempting to embed the file data somewhere using a shared link will fail (because the returned data is the HTML for the web page, not the file data). You can modify these links for direct access though, as covered here: https://help.dropbox.com/files-folders/share/force-download
- GanelonNew member | Level 2
Looks good. Thanks!
About Discuss Dropbox Developer & API
Make connections with other developers803 PostsLatest Activity: 3 hours 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!