21 November, 2012

Embed a Dropbox shared file or photo or music file in a website


To embed a file or a photo or music file ( MP3 ) in a website, which is shared on Dropbox please follow the below steps.



STEP 1. Share a file and get the link for the same.


Link would be something like this.
https://www.dropbox.com/s/asdf1i2o3lkjhie/FileToEmbed.jpg
or
https://www.dropbox.com/s/asdf1i2o3lkjhie/FileToEmbed.jpg?dl=0


STEP 2. Modify the link

Option 1
In the link, please replace www with dl, new link would look something like this.

https://dl.dropbox.com/s/asdf1i2o3lkjhie/FileToEmbed.jpg

Option 2
In the link, please replace www.dropbox with dl.dropboxusercontent, new link would look something like this.

https://dl.dropboxusercontent.com/s/asdf1i2o3lkjhie/FileToEmbed.jpg

Note: Preferably remove from the end of the link "?dl=0"

STEP 3. Copy the link from Step 2 in the website.
This would force for the shared file / image / music file to open and display, without the need to download and open the file.

Previously such links used to be generated for the files placed in Dropbox Public Folder.

Please post a comment if the post was useful. Thank you.

5 comments:

Grandma said...

Sincere thanks for this information. You solved a very basic problem that was creating madness in me! Worked like a charm.

Grandma said...

Thank you, thank you, thank you! Worked like a charm.

Carlos Lobão said...

thank you sir!

gisella said...

Thank!!! Your tips were very very useful to me!!!!!!!
Gisella

Unknown said...

Thank you very much for the tip.