Explorar o código

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 %!s(int64=3) %!d(string=hai) anos
pai
achega
c6212c7d62
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;