diff --git a/demo-simplest-streaming/.meteor/.gitignore b/demo-simplest-streaming/.meteor/.gitignore index 40830374..501f92e4 100644 --- a/demo-simplest-streaming/.meteor/.gitignore +++ b/demo-simplest-streaming/.meteor/.gitignore @@ -1 +1,2 @@ +dev_bundle local diff --git a/demo-simplest-streaming/.meteor/release b/demo-simplest-streaming/.meteor/release index f80cc1ce..e5b4dc18 100644 --- a/demo-simplest-streaming/.meteor/release +++ b/demo-simplest-streaming/.meteor/release @@ -1 +1 @@ -METEOR@1.3.4.1 +METEOR@1.3.4.4 diff --git a/demo-simplest-streaming/.meteor/versions b/demo-simplest-streaming/.meteor/versions index 1300f9b0..485e609d 100644 --- a/demo-simplest-streaming/.meteor/versions +++ b/demo-simplest-streaming/.meteor/versions @@ -1,6 +1,6 @@ allow-deny@1.0.5 -autoupdate@1.2.10 -babel-compiler@6.8.3 +autoupdate@1.2.11 +babel-compiler@6.8.4 babel-runtime@0.1.9_1 base64@1.0.9 binary-heap@1.0.9 @@ -8,49 +8,49 @@ blaze@2.1.8 blaze-html-templates@1.0.4 blaze-tools@1.0.9 boilerplate-generator@1.0.9 -caching-compiler@1.0.5_1 +caching-compiler@1.0.6 caching-html-compiler@1.0.6 callback-hook@1.0.9 check@1.2.3 -coffeescript@1.1.2_1 +coffeescript@1.1.3 ddp@1.2.5 -ddp-client@1.2.8_1 +ddp-client@1.2.9 ddp-common@1.2.6 -ddp-server@1.2.8_1 +ddp-server@1.2.9 deps@1.0.12 diff-sequence@1.0.6 -ecmascript@0.4.6_1 -ecmascript-runtime@0.2.11_1 +ecmascript@0.4.7 +ecmascript-runtime@0.2.12 ejson@1.0.12 -es5-shim@4.5.12_1 +es5-shim@4.5.13 fastclick@1.0.12 geojson-utils@1.0.9 hot-code-push@1.0.4 html-tools@1.0.10 htmljs@1.0.10 -http@1.1.7 +http@1.1.8 id-map@1.0.8 jquery@1.11.9 launch-screen@1.0.12 livedata@1.0.18 -logging@1.0.13_1 -meteor@1.1.15_1 +logging@1.0.14 +meteor@1.1.16 meteor-base@1.0.4 -minifier-css@1.1.12_1 -minifier-js@1.1.12_1 +minifier-css@1.1.13 +minifier-js@1.1.13 minimongo@1.0.17 mobile-experience@1.0.4 mobile-status-bar@1.0.12 -modules@0.6.4 -modules-runtime@0.6.4_1 +modules@0.6.5 +modules-runtime@0.6.5 mongo@1.1.9_1 mongo-id@1.0.5 -npm-mongo@1.4.44_1 +npm-mongo@1.4.45 observe-sequence@1.0.12 ordered-dict@1.0.8 ostrio:cookies@2.0.4 -ostrio:files@1.6.2 -promise@0.7.2_1 +ostrio:files@1.6.4 +promise@0.7.3 random@1.0.10 reactive-var@1.0.10 reload@1.1.10 @@ -58,13 +58,13 @@ retry@1.0.8 routepolicy@1.0.11 spacebars@1.0.12 spacebars-compiler@1.0.12 -standard-minifier-css@1.0.7_1 -standard-minifier-js@1.0.7_1 -templating@1.1.12_1 +standard-minifier-css@1.0.8 +standard-minifier-js@1.0.8 +templating@1.1.13 templating-tools@1.0.4 tracker@1.0.14 ui@1.0.11 underscore@1.0.9 url@1.0.10 -webapp@1.2.9_1 +webapp@1.2.10 webapp-hashing@1.0.9 diff --git a/demo-simplest-streaming/client/main.js b/demo-simplest-streaming/client/main.js index db7b454c..3b85d51c 100644 --- a/demo-simplest-streaming/client/main.js +++ b/demo-simplest-streaming/client/main.js @@ -1,5 +1,5 @@ import { Template } from 'meteor/templating'; - +import { Videos, Images } from '../lib/files.collections.js'; import './main.html'; Template.file.helpers({ diff --git a/demo-simplest-streaming/lib/files.collections.js b/demo-simplest-streaming/lib/files.collections.js index 81a8fe1f..c6cd84be 100644 --- a/demo-simplest-streaming/lib/files.collections.js +++ b/demo-simplest-streaming/lib/files.collections.js @@ -1,16 +1,18 @@ -this.Images = new Meteor.Files({ +import { FilesCollection } from 'meteor/ostrio:files'; + +let Images = new FilesCollection({ debug: true, collectionName: 'Images', - onBeforeUpload: function () { + onBeforeUpload() { // Disallow uploads from client return false; } }); -this.Videos = new Meteor.Files({ +let Videos = new FilesCollection({ debug: true, collectionName: 'Videos', - onBeforeUpload: function () { + onBeforeUpload() { // Disallow uploads from client return false; } @@ -21,7 +23,7 @@ if (Meteor.isServer) { Images.denyClient(); Videos.denyClient(); - Meteor.startup(function () { + Meteor.startup(() => { if (!Images.findOne()) { Images.load('https://raw.githubusercontent.com/VeliovGroup/Meteor-Files/master/logo.png', { fileName: 'logo.png' @@ -35,16 +37,13 @@ if (Meteor.isServer) { } }); - Meteor.publish('files.images.all', function () { - return Images.find().cursor; - }); - - Meteor.publish('files.videos.all', function () { - return Videos.find().cursor; - }); + Meteor.publish('files.images.all', () => Images.find().cursor); + Meteor.publish('files.videos.all', () => Videos.find().cursor); } else { Meteor.subscribe('files.images.all'); Meteor.subscribe('files.videos.all'); -} \ No newline at end of file +} + +export { Videos, Images } \ No newline at end of file diff --git a/demo/.meteor/versions b/demo/.meteor/versions index 6344326a..101e5e0c 100644 --- a/demo/.meteor/versions +++ b/demo/.meteor/versions @@ -81,7 +81,7 @@ observe-sequence@1.0.12 ordered-dict@1.0.8 ostrio:cookies@2.0.4 ostrio:cstorage@2.0.5 -ostrio:files@1.6.3 +ostrio:files@1.6.4 ostrio:flow-router-extra@2.12.2 ostrio:flow-router-meta@1.1.1 ostrio:flow-router-title@2.1.1