* 👕 Enable `consistent-type-imports` for nodes-base * 👕 Apply to nodes-base * ⏪ Undo unrelated changes * 🚚 Move to `.eslintrc.js` in nodes-base * ⏪ Revert "Enable `consistent-type-imports` for nodes-base" This reverts commit 529ad72b051478fa1633aaf84b2864f2fdc7613c. * 👕 Fix severity
60 lines
1.3 KiB
TypeScript
60 lines
1.3 KiB
TypeScript
import type { INodeProperties } from 'n8n-workflow';
|
|
|
|
export const fileUploadDescription: INodeProperties[] = [
|
|
{
|
|
displayName: 'Input Data Field Name',
|
|
name: 'binaryPropertyName',
|
|
type: 'string',
|
|
default: 'data',
|
|
displayOptions: {
|
|
show: {
|
|
operation: ['upload'],
|
|
resource: ['file'],
|
|
},
|
|
},
|
|
required: true,
|
|
description:
|
|
'The name of the input field containing the binary file data to be uploaded. Supported file types: PNG, JPEG.',
|
|
},
|
|
{
|
|
displayName: 'Category Name or ID',
|
|
name: 'categoryId',
|
|
type: 'options',
|
|
description:
|
|
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
typeOptions: {
|
|
loadOptionsMethod: 'getCompanyFileCategories',
|
|
},
|
|
required: true,
|
|
displayOptions: {
|
|
show: {
|
|
operation: ['upload'],
|
|
resource: ['file'],
|
|
},
|
|
},
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Options',
|
|
name: 'options',
|
|
type: 'collection',
|
|
placeholder: 'Add Field',
|
|
displayOptions: {
|
|
show: {
|
|
operation: ['upload'],
|
|
resource: ['file'],
|
|
},
|
|
},
|
|
default: {},
|
|
options: [
|
|
{
|
|
displayName: 'Share with Employee',
|
|
name: 'share',
|
|
type: 'boolean',
|
|
default: true,
|
|
description: 'Whether this file is shared or not',
|
|
},
|
|
],
|
|
},
|
|
];
|