From ccdc64fe4f99a24379548e1a06d0f9799e12cd5e Mon Sep 17 00:00:00 2001 From: Anatoli Nicolae Date: Fri, 13 Dec 2024 00:08:09 +0100 Subject: [PATCH] fix(Slack Node): Apply fixes from #12177 --- .../nodes/Slack/V2/FileDescription.ts | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/nodes-base/nodes/Slack/V2/FileDescription.ts b/packages/nodes-base/nodes/Slack/V2/FileDescription.ts index 3260259ce7..08fb65795e 100644 --- a/packages/nodes-base/nodes/Slack/V2/FileDescription.ts +++ b/packages/nodes-base/nodes/Slack/V2/FileDescription.ts @@ -47,7 +47,7 @@ export const fileFields: INodeProperties[] = [ show: { operation: ['upload'], resource: ['file'], - '@version': [2, 2.1], + '@version': [{ _cnd: { gte: 2 } }], }, }, description: 'Whether the data to upload should be taken from binary field', @@ -62,7 +62,7 @@ export const fileFields: INodeProperties[] = [ operation: ['upload'], resource: ['file'], binaryData: [false], - '@version': [2, 2.1], + '@version': [{ _cnd: { gte: 2 } }], }, }, placeholder: '', @@ -78,23 +78,7 @@ export const fileFields: INodeProperties[] = [ operation: ['upload'], resource: ['file'], binaryData: [true], - '@version': [2, 2.1], - }, - }, - placeholder: '', - description: 'Name of the binary property which contains the data for the file to be uploaded', - }, - { - displayName: 'File Property', - name: 'binaryPropertyName', - type: 'string', - default: 'data', - required: true, - displayOptions: { - show: { - operation: ['upload'], - resource: ['file'], - '@version': [{ _cnd: { gte: 2.2 } }], + '@version': [{ _cnd: { gte: 2 } }], }, }, placeholder: '', @@ -123,7 +107,7 @@ export const fileFields: INodeProperties[] = [ }, displayOptions: { show: { - '@version': [2, 2.1], + '@version': [{ _cnd: { gte: 2 } }], }, }, default: [], @@ -146,6 +130,22 @@ export const fileFields: INodeProperties[] = [ description: 'The channel to send the file to. Choose from the list, or specify an ID using an expression.', }, + { + displayName: 'Channel Name or ID', + name: 'channelId', + type: 'options', + typeOptions: { + loadOptionsMethod: 'getChannels', + }, + displayOptions: { + show: { + '@version': [{ _cnd: { gte: 2.2 } }], + }, + }, + default: [], + description: + 'The channel to send the file to. Choose from the list, or specify an ID using an expression.', + }, { displayName: 'File Name', name: 'fileName',