问题
I need to get all the images on Dropbox with its full URL(not only name) as I need to display images as a list in my android app.
I am using Dropbox core API and called API as following:
DropboxAPI.Entry existingEntry= mDBApi.metadata("/", 1000, null, true, null);
Using above I got all the files listed and also got its name but couldn't get full URL of each file.
Any help is highly appreciated.
Thanks in advance.
回答1:
This depends on what exactly you need to do, and if you actually need a URL, and if so, what kind of URL.
If you just need the content of the image files, you should use the getFile or getFileStream method to access the actual file content and display it as desired.
If you actually need a direct URL to the file contents, you can use media to get the URL. Note that these expire after four hours though.
If you need a longer-lived URL, e.g., for sharing, you can get the (preview) URL by using share. (You can also modify these links for other behaviors as shown here.)
来源:https://stackoverflow.com/questions/33105908/how-should-i-get-all-imagesincluding-full-url-from-dropbox-using-dropbox-core