1
I recently started to study the Google Drive API. I am able to list all the files in Drive and I have access to all its attributes. However, I was asked to search only for the image files.
What did I do? I played the search code inside a Javascript:
if(file.extension === 'jpg' || file.extension === 'png')
But there it is. My search is analyzing all the files from the drive and listing only the . jpg and . png, making my search very poorly optimized. I wonder if anyone could help me. I want my search to search through Drive and return only the img extension files.
Follow the API link https://developers.google.com/drive/v3/web/quickstart/js . From now on, thank you.
In
gapi.client.drive.files.listyou can use the propertyqto search for files. Still in this property, you can pass the value ofmimeTypefor certain file types. Further examples: https://developers.google.com/drive/v2/web/search-parameters– Valdeir Psr
Could you give me an example of how to use this property q ?
– André Luiz