cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
If you know more about files sizes, you can make more informed decisions about which files you upload and then you can maximize the space in your Dropbox Basic account?

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

On Sharing images and email...

On Sharing images and email...

Ganelon
New member | Level 2

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.

1 Accepted Solution

Accepted Solutions

Re: On Sharing images and email...

Greg-DB
Dropboxer

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

View solution in original post

2 Replies 2

Re: On Sharing images and email...

Greg-DB
Dropboxer

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

Re: On Sharing images and email...

Ganelon
New member | Level 2

Looks good. Thanks!

Who's talking

Top contributors to this post

  • User avatar
    Ganelon New member | Level 2
  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?