Skip to content

Commit

Permalink
fix(Google Drive Node): Add supportsAllDrives: true to update and dow…
Browse files Browse the repository at this point in the history
…nload (#8786)
  • Loading branch information
elsmr authored Mar 4, 2024
1 parent e374a36 commit 11a5331
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ describe('test GoogleDriveV2: file download', () => {
'GET',
'/drive/v3/files/fileIDxxxxxx',
{},
{ fields: 'mimeType,name', supportsTeamDrives: true },
{ fields: 'mimeType,name', supportsTeamDrives: true, supportsAllDrives: true },
);
expect(transport.googleApiRequest).toHaveBeenCalledWith(
'GET',
'/drive/v3/files/fileIDxxxxxx',
{},
{ alt: 'media' },
{ alt: 'media', supportsAllDrives: true },
undefined,
{ encoding: 'arraybuffer', json: false, returnFullResponse: true, useStream: true },
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export async function execute(
'GET',
`/drive/v3/files/${fileId}`,
{},
{ fields: 'mimeType,name', supportsTeamDrives: true },
{ fields: 'mimeType,name', supportsTeamDrives: true, supportsAllDrives: true },
);
let response;

Expand Down Expand Up @@ -236,7 +236,7 @@ export async function execute(
'GET',
`/drive/v3/files/${fileId}/export`,
{},
{ mimeType: mime },
{ mimeType: mime, supportsAllDrives: true },
undefined,
requestOptions,
);
Expand All @@ -246,7 +246,7 @@ export async function execute(
'GET',
`/drive/v3/files/${fileId}`,
{},
{ alt: 'media' },
{ alt: 'media', supportsAllDrives: true },
undefined,
requestOptions,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
fileContent,
{
uploadType: 'media',
supportsAllDrives: true,
},
undefined,
{
Expand All @@ -200,7 +201,7 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
'PATCH',
`/upload/drive/v3/files/${fileId}`,
undefined,
{ uploadType: 'resumable' },
{ uploadType: 'resumable', supportsAllDrives: true },
undefined,
{
returnFullResponse: true,
Expand Down

0 comments on commit 11a5331

Please sign in to comment.