Multi-File Storage code was missing after merge

- Merge commit was: 68e8155805
- Partially resolved by this commit: a34cbf95e8
This commit is contained in:
Martin Filser 2022-04-22 11:27:03 +02:00
parent a196a5ed63
commit 3fad014e91
3 changed files with 16 additions and 3 deletions

View file

@ -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 });
}
});
}