From d5346879bac7c5feab3e10fb2d408919cbe4c223 Mon Sep 17 00:00:00 2001 From: michael-peng-hs <153962276+michael-peng-hs@users.noreply.github.com> Date: Sun, 25 Feb 2024 10:11:16 -0800 Subject: [PATCH] Support Google Drive shared folder search (#39) --- src/engines/drive.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engines/drive.ts b/src/engines/drive.ts index 5b9cbb0..efb2d63 100644 --- a/src/engines/drive.ts +++ b/src/engines/drive.ts @@ -50,10 +50,12 @@ const engine: Engine = { const data = await drive.files.list({ // Searches "Visible to anyone in..." // https://developers.google.com/drive/api/v3/search-files#search_the_corpora - corpora: "domain", + corpora: "allDrives", fields: "files(description,id,kind,mimeType,modifiedTime,name,owners)", q: `fullText contains '${q.replace(/'/, "\\'")}'`, spaces: "drive", + includeItemsFromAllDrives: true, + supportsAllDrives: true, }); return ( data.data.files?.map(f => {