1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-09-11 13:15:28 +03:00

fix(Google Drive Node): Add supportsAllDrives: true to update and download (#8786)

This commit is contained in:
Elias Meire 2024-03-04 10:48:56 +01:00 committed by कारतोफ्फेलस्क्रिप्ट™
parent 19b69b6fb0
commit dde6350bf3
3 changed files with 7 additions and 6 deletions

View File

@ -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 },
);

View File

@ -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;
@ -236,7 +236,7 @@ export async function execute(
'GET',
`/drive/v3/files/${fileId}/export`,
{},
{ mimeType: mime },
{ mimeType: mime, supportsAllDrives: true },
undefined,
requestOptions,
);
@ -246,7 +246,7 @@ export async function execute(
'GET',
`/drive/v3/files/${fileId}`,
{},
{ alt: 'media' },
{ alt: 'media', supportsAllDrives: true },
undefined,
requestOptions,
);

View File

@ -185,6 +185,7 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
fileContent,
{
uploadType: 'media',
supportsAllDrives: true,
},
undefined,
{
@ -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,