mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix: BinaryDataManager should store metadata when saving from buffer as well (#4964)
This commit is contained in:
parent
37b1e079ea
commit
5cbb5f4bc8
|
@ -93,6 +93,12 @@ export class BinaryDataManager {
|
|||
|
||||
// Prevent preserving data in memory if handled by a data manager.
|
||||
binaryData.data = this.binaryDataMode;
|
||||
|
||||
await manager.storeBinaryMetadata(identifier, {
|
||||
fileName: binaryData.fileName,
|
||||
mimeType: binaryData.mimeType,
|
||||
fileSize: binaryBuffer.length,
|
||||
});
|
||||
} else {
|
||||
// Else fallback to storing this data in memory.
|
||||
binaryData.data = binaryBuffer.toString(BINARY_ENCODING);
|
||||
|
|
Loading…
Reference in a new issue