mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(Google Drive Node): Add supportsAllDrives: true to update and download (#8786)
This commit is contained in:
parent
e374a3667f
commit
11a5331e03
|
@ -50,13 +50,13 @@ describe('test GoogleDriveV2: file download', () => {
|
||||||
'GET',
|
'GET',
|
||||||
'/drive/v3/files/fileIDxxxxxx',
|
'/drive/v3/files/fileIDxxxxxx',
|
||||||
{},
|
{},
|
||||||
{ fields: 'mimeType,name', supportsTeamDrives: true },
|
{ fields: 'mimeType,name', supportsTeamDrives: true, supportsAllDrives: true },
|
||||||
);
|
);
|
||||||
expect(transport.googleApiRequest).toHaveBeenCalledWith(
|
expect(transport.googleApiRequest).toHaveBeenCalledWith(
|
||||||
'GET',
|
'GET',
|
||||||
'/drive/v3/files/fileIDxxxxxx',
|
'/drive/v3/files/fileIDxxxxxx',
|
||||||
{},
|
{},
|
||||||
{ alt: 'media' },
|
{ alt: 'media', supportsAllDrives: true },
|
||||||
undefined,
|
undefined,
|
||||||
{ encoding: 'arraybuffer', json: false, returnFullResponse: true, useStream: true },
|
{ encoding: 'arraybuffer', json: false, returnFullResponse: true, useStream: true },
|
||||||
);
|
);
|
||||||
|
|
|
@ -202,7 +202,7 @@ export async function execute(
|
||||||
'GET',
|
'GET',
|
||||||
`/drive/v3/files/${fileId}`,
|
`/drive/v3/files/${fileId}`,
|
||||||
{},
|
{},
|
||||||
{ fields: 'mimeType,name', supportsTeamDrives: true },
|
{ fields: 'mimeType,name', supportsTeamDrives: true, supportsAllDrives: true },
|
||||||
);
|
);
|
||||||
let response;
|
let response;
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ export async function execute(
|
||||||
'GET',
|
'GET',
|
||||||
`/drive/v3/files/${fileId}/export`,
|
`/drive/v3/files/${fileId}/export`,
|
||||||
{},
|
{},
|
||||||
{ mimeType: mime },
|
{ mimeType: mime, supportsAllDrives: true },
|
||||||
undefined,
|
undefined,
|
||||||
requestOptions,
|
requestOptions,
|
||||||
);
|
);
|
||||||
|
@ -246,7 +246,7 @@ export async function execute(
|
||||||
'GET',
|
'GET',
|
||||||
`/drive/v3/files/${fileId}`,
|
`/drive/v3/files/${fileId}`,
|
||||||
{},
|
{},
|
||||||
{ alt: 'media' },
|
{ alt: 'media', supportsAllDrives: true },
|
||||||
undefined,
|
undefined,
|
||||||
requestOptions,
|
requestOptions,
|
||||||
);
|
);
|
||||||
|
|
|
@ -185,6 +185,7 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
|
||||||
fileContent,
|
fileContent,
|
||||||
{
|
{
|
||||||
uploadType: 'media',
|
uploadType: 'media',
|
||||||
|
supportsAllDrives: true,
|
||||||
},
|
},
|
||||||
undefined,
|
undefined,
|
||||||
{
|
{
|
||||||
|
@ -200,7 +201,7 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
|
||||||
'PATCH',
|
'PATCH',
|
||||||
`/upload/drive/v3/files/${fileId}`,
|
`/upload/drive/v3/files/${fileId}`,
|
||||||
undefined,
|
undefined,
|
||||||
{ uploadType: 'resumable' },
|
{ uploadType: 'resumable', supportsAllDrives: true },
|
||||||
undefined,
|
undefined,
|
||||||
{
|
{
|
||||||
returnFullResponse: true,
|
returnFullResponse: true,
|
||||||
|
|
Loading…
Reference in a new issue