fix: BinaryDataManager should store metadata when saving from buffer as well (#4964)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2022-12-19 14:11:34 +01:00 committed by GitHub
parent 37b1e079ea
commit 5cbb5f4bc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);