问题
I am getting just getting started with the DropBox API. Using POSTMAN, I have successfully retrieved an access token and have been able to list the metadata for files in my dropbox. I am trying to figure out how to use that metadata to load images on a web page using javascript. Is there an http call to generate a valid url to be used as the src parameter for an image or video element?
回答1:
I think you're looking for the /media
endpoint: https://www.dropbox.com/developers/core/docs#media. It generates anonymous-read URLs that work for up to four hours.
UPDATE
I'm not sure if you're using dropbox.js or not, but the method there is called makeUrl.
回答2:
Ah, I found it! The request name isn't the most intuitive, so I missed it looking through the documentation.
https://api.dropbox.com/1/media//
来源:https://stackoverflow.com/questions/22079407/how-to-load-images-using-metadata-from-the-dropbox-api