mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
refactor(Google Drive Node): Use node streams for uploading and downloading files (#5017)
* use streams to upload files to google drive * use streams to download files from google drive * use resumable uploads api for google drive * avoid dangling promises, and reduce memory usage in error logging
This commit is contained in:
committed by
GitHub
parent
8b19fdd5f0
commit
54126b2c87
@@ -10,6 +10,7 @@ import type {
|
||||
IPollFunctions as IPollFunctionsBase,
|
||||
ITriggerFunctions as ITriggerFunctionsBase,
|
||||
IWebhookFunctions as IWebhookFunctionsBase,
|
||||
BinaryMetadata,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
// TODO: remove these after removing `n8n-core` dependency from `nodes-bases`
|
||||
@@ -56,12 +57,6 @@ export interface IBinaryDataConfig {
|
||||
persistedBinaryDataTTL: number;
|
||||
}
|
||||
|
||||
export interface BinaryMetadata {
|
||||
fileName?: string;
|
||||
mimeType?: string;
|
||||
fileSize: number;
|
||||
}
|
||||
|
||||
export interface IBinaryDataManager {
|
||||
init(startPurger: boolean): Promise<void>;
|
||||
getFileSize(filePath: string): Promise<number>;
|
||||
@@ -71,6 +66,7 @@ export interface IBinaryDataManager {
|
||||
storeBinaryData(binaryData: Buffer | Readable, executionId: string): Promise<string>;
|
||||
retrieveBinaryDataByIdentifier(identifier: string): Promise<Buffer>;
|
||||
getBinaryPath(identifier: string): string;
|
||||
getBinaryStream(identifier: string, chunkSize?: number): Readable;
|
||||
markDataForDeletionByExecutionId(executionId: string): Promise<void>;
|
||||
deleteMarkedFiles(): Promise<unknown>;
|
||||
deleteBinaryDataByIdentifier(identifier: string): Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user