mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Extract From File Node): Make binary data work with any backend (#8647)
Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
committed by
GitHub
parent
1e4e126c01
commit
d33d953497
@@ -160,8 +160,9 @@ export async function extractDataFromPDF(
|
||||
const params: { password?: string; url?: URL; data?: ArrayBuffer } = { password };
|
||||
|
||||
if (binaryData.id) {
|
||||
const binaryPath = this.helpers.getBinaryPath(binaryData.id);
|
||||
params.url = new URL(`file://${binaryPath}`);
|
||||
params.data = await this.helpers.binaryToBuffer(
|
||||
await this.helpers.getBinaryStream(binaryData.id),
|
||||
);
|
||||
} else {
|
||||
params.data = Buffer.from(binaryData.data, BINARY_ENCODING).buffer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user