Skip to content

Commit

Permalink
Step 20.4: Create ThumbsStore and ImagesStore
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela authored and DAB0mB committed Dec 14, 2016
1 parent 1873fe8 commit 1f9c527
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions imports/api/images/store.js
@@ -0,0 +1,18 @@
import { UploadFS } from 'meteor/jalik:ufs';
import { Images, Thumbs } from './collection';

export const ThumbsStore = new UploadFS.store.GridFS({
collection: Thumbs,
name: 'thumbs'
});

export const ImagesStore = new UploadFS.store.GridFS({
collection: Images,
name: 'images',
filter: new UploadFS.Filter({
contentTypes: ['image/*']
}),
copyTo: [
ThumbsStore
]
});

0 comments on commit 1f9c527

Please sign in to comment.