Merge branch 'upgrade-meteor-2.6' of https://github.com/majus/wekan into upgrade-meteor

This commit is contained in:
Lauri Ojansivu 2022-04-18 21:25:47 +03:00
commit 0c3ca14699
268 changed files with 3109 additions and 10419 deletions

View file

@ -1,6 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { FilesCollection } from 'meteor/ostrio:files';
import fs from 'fs';
import path from 'path';
import { createBucket } from './lib/grid/createBucket';
import { createOnAfterUpload } from './lib/fsHooks/createOnAfterUpload';
@ -83,12 +82,7 @@ if (Meteor.isServer) {
});
Meteor.startup(() => {
Attachments.collection._ensureIndex({ 'meta.cardId': 1 });
const storagePath = Attachments.storagePath();
if (!fs.existsSync(storagePath)) {
console.log("create storagePath because it doesn't exist: " + storagePath);
fs.mkdirSync(storagePath, { recursive: true });
}
Attachments.collection.createIndex({ cardId: 1 });
});
}