Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
nadeemphpdots
4 years agoExplorer | Level 4
Get thumbnails of files from shared folders
Hi there,
I get list of files inside shared folder using "2/files/list_folder" with "shared_link" parameter and I am using response from "2/files/list_folder" into "2/files/get_thumbnail_v2"...
nadeemphpdots
4 years agoExplorer | Level 4
Hi Здравко
I am trying to display all thumbnails from shared folder in site and User can select particular thumbnail from list and I want to url of that selected thumbnail.
Now I will display Image by
echo '<img src="data:image/jpg;charset=utf8;base64,'.$data.' />';How can I get actual url of image Actual Image ?
Здравко
4 years agoLegendary | Level 20
😁 I'm not sure you understand, but you are trying to put image file binary content as a source URL of an image. I thought my post above was clear, but seems it's not enough. Think of your "$data" as a content of an image read from file available on your server (not as a URL to there). What will be the result? 🧐 🙂 You have to pass the image data as such not as a URL! There are many correct way this to be done. 😉 Only your imagination ability can restrict you. Of course, there are many wrong ways (like mixing URL and data).
Hope it's a bit more clear now.
- nadeemphpdots4 years agoExplorer | Level 4
Здравко
I am able to display thumbnails, But Now I want to open actual image (not thumbnails) on click of particular thumbnail image.
Is there any api to get both thumbnail and actual image?- Здравко4 years agoLegendary | Level 20
nadeemphpdots wrote:...
Is there any api to get both thumbnail and actual image?No, both - no. You already know how to display your thumbnail. For actual image, you can select using shared link, temporary link, or image data (like the thumbnail). Shared link can be created with 2/sharing/create_shared_link_with_settings, temporary link with 2/files/get_temporary_link, and actual image data with 2/files/download. 😉 First 2 give URL, the last one - data! Don't mix them again. 😁
The choice is yours.
ADD: Actually there is alternative non supported way to get links URL to contained pictures in such a shared folder link. The work of such a hacking way is not guaranteed. Executing something like:
curl https://www.dropbox.com/sh/ns2y8e6lqyh5avz/AAAHX5tPck8CHwpcSKMwV7cba?dl=0 -H "User-Agent: Mozilla" | xmllint --html --xpath "/html/body/script[last()-1]" - | tr '\n' '\f' | sed 's/.*<script type="text\/javascript".*<!\[CDATA\[.*responseReceived("\(.*\)")});.*\]\]><\/script>.*/\1/' | tr '\f' '\n' | sed 's/\\"/"/g' | sed 's/\\\\/\\/g' | jq... will give you all available data for this shared link. You can filter further this information to get desired data. For example, you can get for every single photo on the shared link its thumbnail and full size picture link/URL using following:
curl https://www.dropbox.com/sh/ns2y8e6lqyh5avz/AAAHX5tPck8CHwpcSKMwV7cba?dl=0 -H "User-Agent: Mozilla" | xmllint --html --xpath "/html/body/script[last()-1]" - | tr '\n' '\f' | sed 's/.*<script type="text\/javascript".*<!\[CDATA\[.*responseReceived("\(.*\)")});.*\]\]><\/script>.*/\1/' | tr '\f' '\n' | sed 's/\\"/"/g' | sed 's/\\\\/\\/g' | jq '.entries[] | .thumbnail_url_tmpl, .preview.content.full_size_src'I believe you can "translate" the algorithm above to PHP. 🤫😜
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!