fix(Extract from File Node): Detect file encoding (#12081)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Dana
2024-12-18 16:59:12 +01:00
committed by GitHub
parent bf8142b474
commit 92af245d1a
11 changed files with 129 additions and 2 deletions

View File

@@ -121,8 +121,9 @@ export async function execute(
if (!value) continue;
const encoding = (options.encoding as string) || 'utf8';
const buffer = await this.helpers.getBinaryDataBuffer(itemIndex, binaryPropertyName);
const encoding =
(options.encoding as string) || (this.helpers.detectBinaryEncoding(buffer) as string);
if (options.keepSource && options.keepSource !== 'binary') {
newItem.json = deepCopy(item.json);