You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
MorgsCode
6 years agoExplorer | Level 3
Setting Metadata on files - Python API
Hello! I've just started using the Dropbox Python API, but am a bit confused on how to add custom metadata to new or exists files. I've tried to defined my own PropertyGroup with the data stored ...
- 6 years ago
Thanks for following up. I'm glad to hear you already sorted most of this out.
- The PropertyType.other option is just a catch-all for forwards compatibility with any potential new PropertyType fields. It's not actually something you can use as an alternative to PropertyType.string. Currently the Dropbox API only supports the string type. What other data type in particular would you be looking to use? I'll be happy to pass it along as a feature request.
- You can change the property values on an existing file without re-uploading it. To do so, you would use the file_properties_properties_update method and/or the file_properties_properties_overwrite method. (Be sure to read the documentation for information on the difference between the two.)
MorgsCode
Explorer | Level 3
Thanks for pointing a few things out that I seem to have overlooked. The freezing up, ended up being due to wrong formatting and an incorrect unique id for the custom string template - now sourced correctly using the following code:
template = dropbox.file_properties.PropertyFieldTemplate(name="MyTemplate", description="description",type=dropbox.file_properties.PropertyType.string) my_template_id = dbx.file_properties_templates_add_for_user("MyTemplate","description",[template]).template_id data = dropbox.file_properties.PropertyField(name='MyTemplate', value='foobar')
- Regarding the PropertyFieldTemplate the available types seems to be either 'string' or 'other'. Just curious, how you would use the PropertyType 'other' to store data?
- Can property group data be altered on uploaded files or does it have to be added as part an upload process?
Greg-DB
6 years agoDropbox Staff
Thanks for following up. I'm glad to hear you already sorted most of this out.
- The PropertyType.other option is just a catch-all for forwards compatibility with any potential new PropertyType fields. It's not actually something you can use as an alternative to PropertyType.string. Currently the Dropbox API only supports the string type. What other data type in particular would you be looking to use? I'll be happy to pass it along as a feature request.
- You can change the property values on an existing file without re-uploading it. To do so, you would use the file_properties_properties_update method and/or the file_properties_properties_overwrite method. (Be sure to read the documentation for information on the difference between the two.)
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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 or Facebook.
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!