mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
fix: BinaryDataManager should store metadata when saving from buffer as well (#4964)
This commit is contained in:
committed by
GitHub
parent
37b1e079ea
commit
5cbb5f4bc8
@@ -93,6 +93,12 @@ export class BinaryDataManager {
|
|||||||
|
|
||||||
// Prevent preserving data in memory if handled by a data manager.
|
// Prevent preserving data in memory if handled by a data manager.
|
||||||
binaryData.data = this.binaryDataMode;
|
binaryData.data = this.binaryDataMode;
|
||||||
|
|
||||||
|
await manager.storeBinaryMetadata(identifier, {
|
||||||
|
fileName: binaryData.fileName,
|
||||||
|
mimeType: binaryData.mimeType,
|
||||||
|
fileSize: binaryBuffer.length,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
// Else fallback to storing this data in memory.
|
// Else fallback to storing this data in memory.
|
||||||
binaryData.data = binaryBuffer.toString(BINARY_ENCODING);
|
binaryData.data = binaryBuffer.toString(BINARY_ENCODING);
|
||||||
|
|||||||
Reference in New Issue
Block a user