mirror of
https://github.com/wekan/wekan.git
synced 2025-12-25 03:40:13 +01:00
Multi-File Storage code was missing after merge
- Merge commit was:68e8155805- Partially resolved by this commit:a34cbf95e8
This commit is contained in:
parent
a196a5ed63
commit
3fad014e91
3 changed files with 16 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ template(name="attachmentsGalery")
|
|||
each attachments
|
||||
.attachment-item
|
||||
a.attachment-thumbnail.swipebox(href="{{link}}" title="{{name}}")
|
||||
if isUploaded
|
||||
if link
|
||||
if isImage
|
||||
img.attachment-thumbnail-img(src="{{link}}")
|
||||
else if($eq extension 'mp3')
|
||||
|
|
@ -38,7 +38,7 @@ template(name="attachmentsGalery")
|
|||
else
|
||||
span.attachment-thumbnail-ext= extension
|
||||
else
|
||||
span.attachment-thumbnail-ext= extension
|
||||
+spinner
|
||||
p.attachment-details
|
||||
= name
|
||||
span.file-size ({{fileSize size}} KB)
|
||||
|
|
|
|||
|
|
@ -89,7 +89,12 @@ if (Meteor.isServer) {
|
|||
});
|
||||
|
||||
Meteor.startup(() => {
|
||||
Attachments.collection.createIndex({ cardId: 1 });
|
||||
Attachments.collection.createIndex({ 'meta.cardId': 1 });
|
||||
const storagePath = fileStoreStrategyFactory.storagePath;
|
||||
if (!fs.existsSync(storagePath)) {
|
||||
console.log("create storagePath because it doesn't exist: " + storagePath);
|
||||
fs.mkdirSync(storagePath, { recursive: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,14 @@ if (Meteor.isServer) {
|
|||
remove: isOwner,
|
||||
fetch: ['userId'],
|
||||
});
|
||||
|
||||
Meteor.startup(() => {
|
||||
const storagePath = fileStoreStrategyFactory.storagePath;
|
||||
if (!fs.existsSync(storagePath)) {
|
||||
console.log("create storagePath because it doesn't exist: " + storagePath);
|
||||
fs.mkdirSync(storagePath, { recursive: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export default Avatars;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue