问题
Is there any unique identifier associated with a Dropbox file that doesn't change with revisions/changes/renaming, that can be accessed via the RESTful API? I want to store it in the database and keep track of some operations on the file.
回答1:
Unfortunately, no, the Dropbox API does not currently expose any sort of file ID or hash like this.
Edit: The Dropbox API v2 does now offer file IDs that persist across moves/renames. You can find more information under "Path formats" in the documentation.
The file ID is available as the id
field on the FileMetadata
object, e.g., as returned by /files/get_metadata.
回答2:
The new Dropbox API v2 supports IDs for files and folders.
However, it doesn't automatically differentiate file/folder moves, renames, etc. from deletions and creations in the event stream. You can use a service like Kloudless which provides a unified cloud storage API that includes file/folder IDs for Dropbox. Kloudless also normalizes the event stream and provides access to several other cloud storage services through a single API. (I work at Kloudless)
来源:https://stackoverflow.com/questions/15209512/dropbox-file-unique-identifier-restful-api