mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
fix(HTTP Request Node): Respect the original encoding of the incoming response (#9869)
This commit is contained in:
committed by
GitHub
parent
e84ab35c4a
commit
2d19aef540
@@ -1,7 +1,7 @@
|
||||
import fs from 'node:fs/promises';
|
||||
import { Service } from 'typedi';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { toBuffer } from './utils';
|
||||
import { binaryToBuffer } from './utils';
|
||||
import { ObjectStoreService } from '../ObjectStore/ObjectStore.service.ee';
|
||||
|
||||
import type { Readable } from 'node:stream';
|
||||
@@ -22,7 +22,7 @@ export class ObjectStoreManager implements BinaryData.Manager {
|
||||
metadata: BinaryData.PreWriteMetadata,
|
||||
) {
|
||||
const fileId = this.toFileId(workflowId, executionId);
|
||||
const buffer = await this.toBuffer(bufferOrStream);
|
||||
const buffer = await binaryToBuffer(bufferOrStream);
|
||||
|
||||
await this.objectStoreService.put(fileId, buffer, metadata);
|
||||
|
||||
@@ -100,8 +100,4 @@ export class ObjectStoreManager implements BinaryData.Manager {
|
||||
|
||||
return `workflows/${workflowId}/executions/${executionId}/binary_data/${uuid()}`;
|
||||
}
|
||||
|
||||
private async toBuffer(bufferOrStream: Buffer | Readable) {
|
||||
return await toBuffer(bufferOrStream);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user