Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Direct File Links from Dropbox

Is there a way to get "Direct File Links" from Dropbox in android code without using the Dropbox API's?

I searched a lot on this but did not find a solution. Any responses will be appreciated.

like image 277
ravi tiwari Avatar asked Jul 22 '13 07:07

ravi tiwari


2 Answers

  1. get the file link for exemple https://www.dropbox.com/s/blablabla/test.pdf

  2. replace www by dl

  3. add ?dl=1 to the end

result of our example: https://dl.dropbox.com/s/blablabla/test.pdf?dl=1

like image 82
Bilel Boulifa Avatar answered Sep 21 '22 19:09

Bilel Boulifa


Get the Dropbox link. Something like:

https://www.dropbox.com/s/abcdefg1234567/image.jpg?dl=0

Now replace the part after the ? with raw=1

https://www.dropbox.com/s/abcdefg1234567/image.jpg?raw=1

Paste in a browser and press Enter. That will redirect you to the actual file link. Something like:

https://dl.dropboxusercontent.com/content_link/aBcdEfGHiJ1234567890/file

Be careful to always use the raw=1 link though. The dl.dropboxusercontent.com that you are redirected to has a limited shelf life and will expire.

like image 24
Dave C Avatar answered Sep 23 '22 19:09

Dave C