n8n/packages/nodes-base/nodes/Google/Chat/descriptions/MediaDescription.ts
Michael Kret 5e16dd4ab4
feat(core): Improvements/overhaul for nodes working with binary data (#7651)
Github issue / Community forum post (link here to close automatically):

---------

Co-authored-by: Giulio Andreini <andreini@netseven.it>
Co-authored-by: Marcus <marcus@n8n.io>
2024-01-03 13:08:16 +02:00

59 lines
1.3 KiB
TypeScript

import type { INodeProperties } from 'n8n-workflow';
export const mediaOperations: INodeProperties[] = [
{
displayName: 'Operation',
name: 'operation',
noDataExpression: true,
type: 'options',
displayOptions: {
show: {
resource: ['media'],
},
},
options: [
{
name: 'Download',
value: 'download',
description: 'Download media',
action: 'Download media',
},
],
default: 'download',
},
];
export const mediaFields: INodeProperties[] = [
/* -------------------------------------------------------------------------- */
/* media:download */
/* -------------------------------------------------------------------------- */
{
displayName: 'Resource Name',
name: 'resourceName',
type: 'string',
required: true,
displayOptions: {
show: {
resource: ['media'],
operation: ['download'],
},
},
default: '',
description: 'Name of the media that is being downloaded',
},
{
displayName: 'Put Output File in Field',
name: 'binaryPropertyName',
type: 'string',
default: 'data',
required: true,
displayOptions: {
show: {
resource: ['media'],
operation: ['download'],
},
},
hint: 'The name of the output binary field to put the file in',
},
];