feat(Google Drive Node): Add move to trash support (#3693)

* feat(Google Drive Node): Add move to trash support

*  Improvements

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
Olivier Aygalenq
2022-07-15 10:14:59 +02:00
committed by GitHub
parent 35e90dcb1a
commit 74064325c8

View File

@@ -915,6 +915,13 @@ export class GoogleDrive implements INodeType {
default: false,
description: 'Whether to set the \'keepForever\' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.',
},
{
displayName: 'Move to Trash',
name: 'trashed',
type: 'boolean',
default: false,
description: 'Whether to move a file to the trash. Only the owner may trash a file.',
},
{
displayName: 'OCR Language',
name: 'ocrLanguage',
@@ -2498,6 +2505,10 @@ export class GoogleDrive implements INodeType {
body.name = updateFields.fileName;
}
if (updateFields.hasOwnProperty('trashed')) {
body.trashed = updateFields.trashed;
}
if (updateFields.parentId && updateFields.parentId !== '') {
qs.addParents = updateFields.parentId;
}