mirror of
https://github.com/n8n-io/n8n.git
synced 2024-09-20 06:47:32 -07:00
Add encoding Option
This commit is contained in:
parent
7ebe09cec1
commit
2c45460d90
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue