Dropbox get public url of the file after upload

冷暖自知 提交于 2019-12-13 00:26:18

问题


Need to upload files to dropbox and get the public url of that file. I'am generating thumbnails and need to show that in my site. I should also show the original files to users without login to the dropbox site.

After uploading to dropbox I need to get the original file url which will be used by crocodoc api viewer.

I could able to upload the file and I am getting the metadata of that file. I created shared url and given that url that url img tag in html but seems returning as html instead of image.

I have gone through similar questions mentioned in SO but almost all are referring old documents.


回答1:


I found this trick earlier and thought I'd share.

Go to: https://www.dropbox.com/home

Then, highlight your mouse over an item, click on share.

This will popup:

Simply change:

https://www.dropbox.com/s/io9oz94lgm2j2bb/loadingscreen.jpg?dl=0

to

https://dl.dropbox.com/s/io9oz94lgm2j2bb/loadingscreen.jpg

Replacing the www with dl, to get the direct, public url.



来源:https://stackoverflow.com/questions/29895048/dropbox-get-public-url-of-the-file-after-upload

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!