Attachment filename was truncated to 28 characters since Meteor-Files 2.1.0. Fixed this

See also:
e3a347c432 (diff-4d4d0cea7e443590b59dddca4fc34faa6f37fbfd94a251d8d0047b8aa8ca19eeR4-R6)
This commit is contained in:
Martin Filser 2022-07-11 21:52:18 +02:00
parent f6f5c7ccf0
commit db8e707049

View file

@ -129,6 +129,9 @@ if (Meteor.isServer) {
const fileObj = Attachments.findOne({_id: fileObjId});
moveToStorage(fileObj, storageDestination, fileStoreStrategyFactory);
// since Meteor-Files 2.1.0 the filename is truncated to 28 characters, so rename the file after upload to the right filename back
rename(fileObj, fileObj.name, fileStoreStrategyFactory);
},
renameAttachment(fileObjId, newName) {
check(fileObjId, String);