mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
Add encoding Option
This commit is contained in:
@@ -199,6 +199,20 @@ export class MoveBinaryData implements INodeType {
|
|||||||
default: false,
|
default: false,
|
||||||
description: 'Use data as is and do not JSON.stringify it.',
|
description: 'Use data as is and do not JSON.stringify it.',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Encoding',
|
||||||
|
name: 'encoding',
|
||||||
|
type: 'string',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
'/mode': [
|
||||||
|
'binaryToJson',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
default: 'ascii',
|
||||||
|
description: 'Set the encoding of the data stream',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -235,7 +249,7 @@ export class MoveBinaryData implements INodeType {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const convertedValue = JSON.parse(new Buffer(value.data, 'base64').toString('ascii'));
|
const convertedValue = JSON.parse(new Buffer(value.data, 'base64').toString(options.encoding));
|
||||||
|
|
||||||
if (setAllData === true) {
|
if (setAllData === true) {
|
||||||
// Set the full data
|
// Set the full data
|
||||||
|
|||||||
Reference in New Issue
Block a user