mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Save files serverside with filename ObjectID, without filename.
Thanks to g-roliveira, iamabrantes, Floaz, koelle25, scott-dunt, mfilser and xet7 ! Fixes #4416
This commit is contained in:
parent
f0a6fa68ea
commit
76ac070f9b
2 changed files with 16 additions and 3 deletions
|
|
@ -72,7 +72,12 @@ Attachments = new FilesCollection({
|
|||
filenameWithoutExtension = Math.random().toString(36).slice(2);
|
||||
fileId = Math.random().toString(36).slice(2);
|
||||
}
|
||||
const ret = fileId + "-original-" + filenameWithoutExtension;
|
||||
|
||||
// OLD:
|
||||
//const ret = fileId + "-original-" + filenameWithoutExtension;
|
||||
// NEW: Save file only with filename of ObjectID, not including filename.
|
||||
// Fixes https://github.com/wekan/wekan/issues/4416#issuecomment-1510517168
|
||||
const ret = fileId;
|
||||
// remove fileId from meta, it was only stored there to have this information here in the namingFunction function
|
||||
return ret;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue