Google Drive: Add support for creating folders & copying files for shared drives (#1436)

* Google Drive: Add support for creating folders for shared drives

* Google Drive: set supportAllDrives parameter to true

* fix(GoogleDrive): added supportAllDrives parameter for copy files
This commit is contained in:
Agata M 2021-04-02 18:14:39 +02:00 committed by GitHub
parent b406d4b60b
commit 499fa48784
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1996,7 +1996,11 @@ export class GoogleDrive implements INodeType {
} }
} }
const response = await googleApiRequest.call(this, 'POST', `/drive/v3/files/${fileId}/copy`, body); const qs = {
supportsAllDrives: true
}
const response = await googleApiRequest.call(this, 'POST', `/drive/v3/files/${fileId}/copy`, body, qs);
returnData.push(response as IDataObject); returnData.push(response as IDataObject);
@ -2243,6 +2247,7 @@ export class GoogleDrive implements INodeType {
const qs = { const qs = {
fields: queryFields, fields: queryFields,
supportsAllDrives: true,
}; };
const response = await googleApiRequest.call(this, 'POST', '/drive/v3/files', body, qs); const response = await googleApiRequest.call(this, 'POST', '/drive/v3/files', body, qs);