cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Discuss Dropbox Developer & API

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

Re: On Sharing images and email...

On Sharing images and email...

Ganelon
New member | Level 2
Go to solution

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

Greg-DB
Dropbox Staff
Go to solution

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

Greg-DB
Dropbox Staff
Go to solution

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

Ganelon
New member | Level 2
Go to solution

Looks good. Thanks!

Need more support?