Browse Source

Updated dependencies like ostrio:files etc.

Thanks to developers of dependencies and xet7 !

Related https://github.com/veliovgroup/Meteor-Files/issues/847
Lauri Ojansivu 2 years ago
parent
commit
7c619859fc
2 changed files with 11 additions and 7 deletions
  1. 6 6
      .meteor/versions
  2. 5 1
      models/attachments.js

+ 6 - 6
.meteor/versions

@@ -1,4 +1,4 @@
-accounts-base@2.2.3
+accounts-base@2.2.4
 accounts-oauth@1.4.1
 accounts-oauth@1.4.1
 accounts-password@2.3.1
 accounts-password@2.3.1
 aldeed:collection2@2.10.0
 aldeed:collection2@2.10.0
@@ -10,11 +10,11 @@ allow-deny@1.1.1
 arillo:flow-router-helpers@0.5.2
 arillo:flow-router-helpers@0.5.2
 audit-argument-checks@1.0.7
 audit-argument-checks@1.0.7
 autoupdate@1.8.0
 autoupdate@1.8.0
-babel-compiler@7.9.0
+babel-compiler@7.9.2
 babel-runtime@1.5.1
 babel-runtime@1.5.1
 base64@1.0.12
 base64@1.0.12
 binary-heap@1.0.11
 binary-heap@1.0.11
-blaze@2.6.0
+blaze@2.6.1
 blaze-tools@1.1.3
 blaze-tools@1.1.3
 boilerplate-generator@1.7.1
 boilerplate-generator@1.7.1
 caching-compiler@1.2.2
 caching-compiler@1.2.2
@@ -94,8 +94,8 @@ meteorhacks:subs-manager@1.6.4
 meteortesting:browser-tests@1.3.5
 meteortesting:browser-tests@1.3.5
 meteortesting:mocha@2.0.3
 meteortesting:mocha@2.0.3
 meteortesting:mocha-core@8.0.1
 meteortesting:mocha-core@8.0.1
-minifier-css@1.6.0
-minifier-js@2.7.4
+minifier-css@1.6.1
+minifier-js@2.7.5
 minifiers@1.1.8-faster-rebuild.0
 minifiers@1.1.8-faster-rebuild.0
 minimongo@1.8.0
 minimongo@1.8.0
 modern-browsers@0.1.8
 modern-browsers@0.1.8
@@ -123,7 +123,7 @@ ongoworks:speakingurl@1.1.0
 ordered-dict@1.1.0
 ordered-dict@1.1.0
 ostrio:cookies@2.7.2
 ostrio:cookies@2.7.2
 ostrio:cstorage@4.0.1
 ostrio:cstorage@4.0.1
-ostrio:files@2.0.1
+ostrio:files@2.2.1
 ostrio:i18n@3.2.0
 ostrio:i18n@3.2.0
 pascoual:pdfkit@1.0.7
 pascoual:pdfkit@1.0.7
 peerlibrary:assert@0.3.0
 peerlibrary:assert@0.3.0

+ 5 - 1
models/attachments.js

@@ -40,13 +40,17 @@ Attachments = new FilesCollection({
   debug: false, // Change to `true` for debugging
   debug: false, // Change to `true` for debugging
   collectionName: 'attachments',
   collectionName: 'attachments',
   allowClientCode: true,
   allowClientCode: true,
+/* Commenting out because this custom namingFunction did not work:
+   https://github.com/veliovgroup/Meteor-Files/issues/847
+
   namingFunction(opts) {
   namingFunction(opts) {
-    const filenameWithoutExtension = opts.name.replace(/(.+)\..+/, "$1");
+    const filenameWithoutExtension = opts.meta.name.replace(/(.+)\..+/, "$1");
     const ret = opts.meta.fileId + "-original-" + filenameWithoutExtension;
     const ret = opts.meta.fileId + "-original-" + filenameWithoutExtension;
     // remove fileId from meta, it was only stored there to have this information here in the namingFunction function
     // remove fileId from meta, it was only stored there to have this information here in the namingFunction function
     delete opts.meta.fileId;
     delete opts.meta.fileId;
     return ret;
     return ret;
   },
   },
+*/
   storagePath() {
   storagePath() {
     const ret = fileStoreStrategyFactory.storagePath;
     const ret = fileStoreStrategyFactory.storagePath;
     return ret;
     return ret;