Currently, I'm getting the file names of a folder in nodejs API using below code,
service.files.list(
{
auth: auth,
pageSize: 1000,
q: "'folderid' in parents",
fields: 'nextPageToken, files(id, name,parents)'})
Now I have requirement to do the check for multiple folder ids and is not able to figure out what is the right syntax to pass multiple folderids in the same query.
Something like this is not working,
service.files.list(
{
auth: auth,
pageSize: 1000,
q: "['folderid',folderid2'] in parents",
fields: 'nextPageToken, files(id, name,parents)'})`
Greetings! I don't have any inside knowledge, but looking at this page:
https://developers.google.com/drive/api/v3/search-files
It looks like you can use or in the q field. Have you tried something like:
q: "'folderid' in parents or 'filderid2' in parents"
works thanks!