Google Drive API filter trashed files

7 views
Skip to first unread message

Ivan Navarro

unread,
2:15 PM (2 hours ago) 2:15 PM
to Chromium Extensions
hi,
I'm working on an extension that fetches Google Drive files from users, and I need to filter out the trashed files from the results. Based on the documentation, I believe I need the following approach to achieve this, but it isn't working, and trashed files are still being returned.

const query = `name = '${title}' and mimeType = 'application/vnd.google-apps.spreadsheet' and trashed = false`;
const searchUrl = `${url}?q=${encodeURIComponent(query)}`;


I've also read that I can check the trashed attribute in the returned files, but my results don't include this attribute.

Has anyone found an effective method to filter out trashed files?

Thanks for any help!

Iván


Reply all
Reply to author
Forward
0 new messages