mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
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.
This commit is contained in:
parent
b8d14abe0c
commit
c6212c7d62
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ Attachments = new FilesCollection({
|
||||||
allowClientCode: true,
|
allowClientCode: true,
|
||||||
namingFunction(opts) {
|
namingFunction(opts) {
|
||||||
const filenameWithoutExtension = opts.name.replace(/(.+)\..+/, "$1");
|
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
|
// 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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue