Selaa lähdekoodia

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

See also:
https://github.com/veliovgroup/Meteor-Files/commit/e3a347c432b1296c2f6ee9ce48d356b631d2ce14#diff-4d4d0cea7e443590b59dddca4fc34faa6f37fbfd94a251d8d0047b8aa8ca19eeR4-R6
Martin Filser 2 vuotta sitten
vanhempi
sitoutus
db8e707049
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      models/attachments.js

+ 3 - 0
models/attachments.js

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