This repository has been archived by the owner on Feb 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdixeet.jsx
69 lines (55 loc) · 1.64 KB
/
dixeet.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Tasks = new Mongo.Collection("tasks");
if (Meteor.isServer) {
Parameters = new Mongo.Collection("params");
//Parameters.insert({
// name: 'admin',
// value: '?admin'
//});
//Parameters.insert({
// name: 'writer',
// value: '?writer'
//});
//
//Parameters.insert({
// name: 'user',
// value: '?user'
//});
}
/*var createThumb = function(fileObj, readStream, writeStream) {
// Transform the image into a 10x10px thumbnail
gm(readStream, fileObj.name()).resize('10', '10').stream().pipe(writeStream);
};*/
var imageStore = new FS.Store.GridFS("images1", {
//mongoUrl: 'mongodb://127.0.0.1:27017/test/', // optional, defaults to Meteor's local MongoDB spo
//mongoOptions: {...}, // optional, see note below
//transformWrite: myTransformWriteFunction, //optional
//transformRead: myTransformReadFunction, //optional
maxTries: 1, // optional, default 5
chunkSize: 1024*1024 // optional, default GridFS chunk size in bytes (can be overridden per file).
// Default: 2MB. Reasonable range: 512KB - 4MB
});
Images = new FS.Collection("images", {
stores: [imageStore]
});
FlowRouter.route('/', {
action: function() {
ReactLayout.render(App, {
stream: null
});
}
});
FlowRouter.route('/:stream', {
action: function(params) {
ReactLayout.render(App, {
stream: params.stream
});
}
});
if (Meteor.isClient) {
// This code is executed on the client only
Meteor.startup(function () {
// Use Meteor.startup to render the component after the page is ready
//React.render(<Layout />, document.getElementById("render-target"));
lightbox.init();
});
}