问题
I would like to use the googledrive api to search for files. I would like to add metadata to it.
Example:
File: computers1.pdf
Brand: brand1
File: computers2.pdf
Brand: brand2
File: computers3.doc
Brand: brand2
As you can see the file names aren't usefull to search for a certain brand. There are many files so renaming them all is hard and sometimes a file can have multiple 'brands'.
Is there a way to add custom metadata to the file/index of google. In this example it would be to get all the files from brand: x.
回答1:
This is not currently possible with the Drive API, but we understand your use case and we are already considering implementing something that will help you with that. Please stay tuned!
For the moment, you might want to use the description
field to store your metadata and perform searches on that.
Another important thing to mention is that Google Drive will automatically index the text from PDFs, so you can already search for those values if they are included in the document body.
来源:https://stackoverflow.com/questions/12093934/google-drive-add-meta-data-to-file