mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
WRITABLE_PATH is mandatory, so simplify the code logic
This commit is contained in:
parent
d63f1b740c
commit
927f155078
3 changed files with 6 additions and 12 deletions
|
|
@ -28,10 +28,8 @@ Attachments = new FilesCollection({
|
|||
return ret;
|
||||
},
|
||||
storagePath() {
|
||||
if (process.env.WRITABLE_PATH) {
|
||||
return path.join(process.env.WRITABLE_PATH, 'uploads', 'attachments');
|
||||
}
|
||||
return path.normalize(`assets/app/uploads/${this.collectionName}`);
|
||||
const ret = path.join(process.env.WRITABLE_PATH, 'attachments');
|
||||
return ret;
|
||||
},
|
||||
onAfterUpload(fileObj) {
|
||||
Object.keys(fileObj.versions).forEach(versionName => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue