Skip to content

Commit

Permalink
Support Google Drive shared folder search (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-peng-hs authored Feb 25, 2024
1 parent e4c5c0b commit d534687
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/engines/drive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit d534687

Please sign in to comment.