Browse Source

fixup! Ref: Attachments to use modern gridfs (rm localstore)

David Arnold 4 years ago
parent
commit
c29393dd7e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      models/attachments.js

+ 4 - 1
models/attachments.js

@@ -5,7 +5,10 @@ import { createOnAfterUpload } from './lib/fsHooks/createOnAfterUpload';
 import { createInterceptDownload } from './lib/fsHooks/createInterceptDownload';
 import { createOnAfterRemove } from './lib/fsHooks/createOnAfterRemove';
 
-const attachmentBucket = createBucket('attachments');
+let attachmentBucket;
+if (Meteor.isServer) {
+  attachmentBucket = createBucket('attachments');
+}
 
 const insertActivity = (fileObj, activityType) =>
   Activities.insert({