-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Théo mathieu
committed
Mar 20, 2016
1 parent
a5bae25
commit d4cb79b
Showing
16 changed files
with
130 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
const ImagesFiles = new FS.Collection("imagesFiles", { | ||
stores: [ | ||
new FS.Store.GridFS("imagesFiles"), | ||
new FS.Store.GridFS("anotherStore") | ||
] | ||
}); | ||
|
||
const allow = function(userId) { | ||
return !!userId; | ||
}; | ||
|
||
ImagesFiles.allow({ | ||
download: allow | ||
}); | ||
|
||
export default ImagesFiles; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* global ReactMeteorData */ | ||
import React, {Component} from 'react'; | ||
import reactMixin from 'react-mixin'; | ||
|
||
import { ImagesFiles } from 'collections'; | ||
|
||
@reactMixin.decorate(ReactMeteorData) | ||
export default class TodosComponent extends Component { | ||
getMeteorData() { | ||
return { | ||
image: ImagesFiles.findOne() | ||
}; | ||
} | ||
render() { | ||
const { image } = this.data; | ||
console.log(image); | ||
return ( | ||
<div> | ||
<img src={image && image.url({store: 'anotherStore'})} alt=""/> | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { ImagesFiles } from '../collections'; | ||
|
||
export default function() { | ||
if (Meteor.isClient) { | ||
Meteor.subscribe('imagesFiles'); | ||
} | ||
|
||
if (Meteor.isServer) { | ||
Meteor.publish('imagesFiles', function() { | ||
return ImagesFiles.find({}); | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import imagesFiles from './imagesFiles'; | ||
import settings from './settings'; | ||
import todos from './todos'; | ||
|
||
export default function() { | ||
imagesFiles(); | ||
todos(); | ||
settings(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,5 @@ mindfront:why-reminify | |
aldeed:simple-schema | ||
aldeed:collection2 | ||
reactjs:react | ||
cfs:standard-packages | ||
cfs:gridfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,23 @@ [email protected] | |
[email protected] | ||
[email protected] | ||
[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
cfs:[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
|
@@ -55,6 +72,7 @@ [email protected] | |
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected]_2 | ||
[email protected]_1 | ||
[email protected] | ||
|