Skip to content
Snippets Groups Projects
Commit 2783e701 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Init GridFS move to upload package

parent 5ba6e00b
No related branches found
No related tags found
No related merge requests found
......@@ -131,13 +131,6 @@ if (UploadFS) {
Meteor.startup(function() {
if (Meteor.isServer) {
initFileStore();
} else {
Tracker.autorun(function(c) {
if (Meteor.userId() && RocketChat.settings.cachedCollection.ready.get()) {
initFileStore();
c.stop();
}
});
}
});
}
/* globals FileUpload, UploadFS */
new UploadFS.store.GridFS({
collection: RocketChat.models.Uploads.model,
name: 'GridFS:Uploads',
collectionName: 'rocketchat_uploads',
filter: new UploadFS.Filter({
onCheck: FileUpload.validateFileUpload
})
});
new UploadFS.store.GridFS({
collection: RocketChat.models.Avatars.model,
name: 'GridFS:Avatars',
filter: new UploadFS.Filter({
onCheck: FileUpload.validateFileUpload
})
});
......@@ -11,6 +11,7 @@ Package.onUse(function(api) {
api.use('ecmascript');
api.use('rocketchat:file');
api.use('jalik:ufs');
api.use('jalik:ufs-gridfs');
api.use('jalik:ufs-local@0.2.5');
api.use('edgee:slingshot');
api.use('ostrio:cookies');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment