fix(Webhook Node): Binary data handling (#7804)

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Michael Kret
2023-12-06 17:46:40 +02:00
committed by GitHub
parent 92fa6233d3
commit 565b409a82
3 changed files with 81 additions and 13 deletions

View File

@@ -202,6 +202,7 @@ export const optionsProperty: INodeProperties = {
displayOptions: {
show: {
'/httpMethod': ['PATCH', 'PUT', 'POST'],
'@version': [1],
},
},
default: false,
@@ -212,15 +213,28 @@ export const optionsProperty: INodeProperties = {
name: 'binaryPropertyName',
type: 'string',
default: 'data',
required: true,
displayOptions: {
show: {
binaryData: [true],
'@version': [1],
},
},
description:
'Name of the binary property to write the data of the received file to. If the data gets received via "Form-Data Multipart" it will be the prefix and a number starting with 0 will be attached to it.',
},
{
displayName: 'Binary Property',
name: 'binaryPropertyName',
type: 'string',
default: 'data',
displayOptions: {
hide: {
'@version': [1],
},
},
description:
'Name of the binary property to write the data of the received file to, only relevant if binary data is received',
},
{
displayName: 'Ignore Bots',
name: 'ignoreBots',
@@ -248,6 +262,9 @@ export const optionsProperty: INodeProperties = {
name: 'rawBody',
type: 'boolean',
displayOptions: {
show: {
'@version': [1],
},
hide: {
binaryData: [true],
noResponseBody: [true],
@@ -257,6 +274,19 @@ export const optionsProperty: INodeProperties = {
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
description: 'Raw body (binary)',
},
{
displayName: 'Raw Body',
name: 'rawBody',
type: 'boolean',
displayOptions: {
hide: {
noResponseBody: [true],
'@version': [1],
},
},
default: false,
description: 'Whether to return the raw body',
},
{
displayName: 'Response Data',
name: 'responseData',