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 Dotan Simha committed Nov 22, 2016
1 parent 0f785eb commit a7b81cb
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 a7b81cb

Please sign in to comment.