瀏覽代碼

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 年之前
父節點
當前提交
c6212c7d62
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;