mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
Add encoding Option
This commit is contained in:
@@ -199,6 +199,20 @@ export class MoveBinaryData implements INodeType {
|
||||
default: false,
|
||||
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;
|
||||
}
|
||||
|
||||
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) {
|
||||
// Set the full data
|
||||
|
||||
Reference in New Issue
Block a user