From c6212c7d62484aa0b46b874dad1d91d5a983e470 Mon Sep 17 00:00:00 2001 From: Martin Filser Date: Fri, 8 Apr 2022 18:59:38 +0200 Subject: [PATCH] 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. --- models/attachments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/attachments.js b/models/attachments.js index aaa4f370e..bbbf8e596 100644 --- a/models/attachments.js +++ b/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;