Browse Source

Initial attachment upload set's now "original" in filename too

- later if the file is moving to filesystem, it has "original" in the filename too.
Martin Filser 3 years ago
parent
commit
c6212c7d62
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/attachments.js

+ 1 - 1
models/attachments.js

@@ -24,7 +24,7 @@ Attachments = new FilesCollection({
   allowClientCode: true,
   namingFunction(opts) {
     const filenameWithoutExtension = opts.name.replace(/(.+)\..+/, "$1");
-    const ret = opts.meta.fileId + "-" + 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
     delete opts.meta.fileId;
     return ret;