fix(Google Drive Node): Fix regex in file RLC (#6607)

This commit is contained in:
Michael Kret
2023-07-05 23:15:13 +03:00
committed by GitHub
parent 8abb03d7cf
commit 56721468df
7 changed files with 37 additions and 52 deletions

View File

@@ -20,6 +20,7 @@ import {
getRevisionFile,
sheetBinaryToArrayOfArrays,
} from './GoogleSheetsTrigger.utils';
import { GOOGLE_DRIVE_FILE_URL_REGEX } from '../constants';
export class GoogleSheetsTrigger implements INodeType {
description: INodeTypeDescription = {
@@ -84,15 +85,13 @@ export class GoogleSheetsTrigger implements INodeType {
type: 'string',
extractValue: {
type: 'regex',
regex:
'https:\\/\\/(?:drive|docs)\\.google\\.com(?:\\/.*|)\\/d\\/([0-9a-zA-Z\\-_]+)(?:\\/.*|)',
regex: GOOGLE_DRIVE_FILE_URL_REGEX,
},
validation: [
{
type: 'regex',
properties: {
regex:
'https:\\/\\/(?:drive|docs)\\.google.com(?:\\/.*|)\\/d\\/([0-9a-zA-Z\\-_]+)(?:\\/.*|)',
regex: GOOGLE_DRIVE_FILE_URL_REGEX,
errorMessage: 'Not a valid Google Drive File URL',
},
},