简体   繁体   English

有没有办法通过带有 Python 的保管箱 api 更新文件元数据?

[英]Is there a way to UPDATE file metadata through dropbox api with Python?

I know you can get the metadata through dropbox API, but I would like to write metadata onto the files I have on dropbox, any ideas?我知道您可以通过 Dropbox API 获取元数据,但我想将元数据写入我在 Dropbox 上的文件中,有什么想法吗? Thank you:)谢谢:)

If you want to update the standard metadata for files on Dropbox, eg, name , path_lower , client_modified etc., as seen in FileMetadata , you do so by performing the relevant file operations.如果您想更新 Dropbox 上文件的标准元数据,例如namepath_lowerclient_modified等,如FileMetadata ,您可以通过执行相关文件操作来实现。 For instance, you can use files_upload to upload new/updated versions of files and set the path and client_modified when doing so, or you can move files (changing their path) by using files_move_v2 .例如,您可以使用files_upload上传文件的新/更新版本并设置pathclient_modified这样做时,或者您可以使用files_move_v2移动文件(更改其路径)。 (Some of the standard metadata properties though, eg, id , are set by Dropbox and can't be arbitrarily modified.) (一些标准的元数据属性,例如id ,是由 Dropbox 设置的,不能随意修改。)

If you want to set custom metadata, ie, something specific to your app, you can use the "file properties" functionality .如果您想设置自定义元数据,即特定于您的应用程序的内容,您可以使用“文件属性”功能

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM