mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
refactor(Read Binary File Node): Use node streams for to reduce memory usage (#5069)
This commit is contained in:
committed by
GitHub
parent
a455cce7e6
commit
8bee04cd2a
@@ -3,6 +3,7 @@
|
||||
import type * as express from 'express';
|
||||
import type * as FormData from 'form-data';
|
||||
import type { IncomingHttpHeaders } from 'http';
|
||||
import type { Readable } from 'stream';
|
||||
import type { URLSearchParams } from 'url';
|
||||
import type { OptionsWithUri, OptionsWithUrl } from 'request';
|
||||
import type { RequestPromiseOptions, RequestPromiseAPI } from 'request-promise-native';
|
||||
@@ -633,7 +634,11 @@ export interface JsonHelperFunctions {
|
||||
}
|
||||
|
||||
export interface BinaryHelperFunctions {
|
||||
prepareBinaryData(binaryData: Buffer, filePath?: string, mimeType?: string): Promise<IBinaryData>;
|
||||
prepareBinaryData(
|
||||
binaryData: Buffer | Readable,
|
||||
filePath?: string,
|
||||
mimeType?: string,
|
||||
): Promise<IBinaryData>;
|
||||
setBinaryDataBuffer(data: IBinaryData, binaryData: Buffer): Promise<IBinaryData>;
|
||||
copyBinaryFile(filePath: string, fileName: string, mimeType?: string): Promise<IBinaryData>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user