Skip to content

Commit

Permalink
Merge pull request #147 from VeliovGroup/dev
Browse files Browse the repository at this point in the history
v1.6.4
 - ES6 (ECMAScript 2015) support, thanks to @sethmurphy18
 - Partly move codebase to ES6
 - Minor codebase enhancements
 - Move demo-simplest-streaming to ES6
  • Loading branch information
dr-dimitru authored Jul 13, 2016
2 parents 035886a + f19d251 commit 2a17242
Show file tree
Hide file tree
Showing 14 changed files with 543 additions and 532 deletions.
2 changes: 1 addition & 1 deletion .versions
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ [email protected]
[email protected]
[email protected]
ostrio:[email protected]
ostrio:[email protected].3
ostrio:[email protected].4
[email protected]
[email protected]
[email protected]
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ ToC:
- [Awards](https://github.com/VeliovGroup/Meteor-Files#awards)
- [See *MF* in action](https://github.com/VeliovGroup/Meteor-Files#demo-application) - Demo application
- [Why this package?](https://github.com/VeliovGroup/Meteor-Files#why-meteor-files)
- [Installation](https://github.com/VeliovGroup/Meteor-Files#install)
- [Installation](https://github.com/VeliovGroup/Meteor-Files#installation)
- [ES6 Import](https://github.com/VeliovGroup/Meteor-Files#es6-import)
- [API](https://github.com/VeliovGroup/Meteor-Files#api-overview-full-api):
* [Initialize Collection](https://github.com/VeliovGroup/Meteor-Files#new-filescollectionconfig-isomorphic)
* [Upload file](https://github.com/VeliovGroup/Meteor-Files#insertsettings-autostart-client)
Expand Down Expand Up @@ -73,12 +74,18 @@ The `cfs` is a well known package, but it's huge monster which combines everythi

Easy-peasy kids, *yeah*?

Install:
Installation:
========
```shell
meteor add ostrio:files
```

ES6 Import:
========
```jsx
import { FilesCollection } from 'meteor/ostrio:files';
```

API overview (*[full API](https://github.com/VeliovGroup/Meteor-Files/wiki)*)
========
Note: When using any of `accounts` packages - package `accounts-base` must be explicitly added to `.meteor/packages` above `ostrio:files`
Expand Down Expand Up @@ -286,6 +293,7 @@ Supporters:
I would like to thank everyone who support this project. *Because of those guys this project can have 100% of our attention*.
- [@themeteorchef](https://github.com/themeteorchef)
- [@MeDBejoHok](https://github.com/medbejohok)
- [@martunta](https://github.com/martunta)

----

Expand Down
1 change: 1 addition & 0 deletions demo-simplest-streaming/.meteor/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dev_bundle
local
2 changes: 1 addition & 1 deletion demo-simplest-streaming/.meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[email protected].1
[email protected].4
46 changes: 23 additions & 23 deletions demo-simplest-streaming/.meteor/versions
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
[email protected]
[email protected].10
[email protected].3
[email protected].11
[email protected].4
[email protected]_1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].5_1
[email protected].6
[email protected]
[email protected]
[email protected]
[email protected].2_1
[email protected].3
[email protected]
[email protected].8_1
[email protected].9
[email protected]
[email protected].8_1
[email protected].9
[email protected]
[email protected]
[email protected].6_1
[email protected].11_1
[email protected].7
[email protected].12
[email protected]
[email protected].12_1
[email protected].13
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].7
[email protected].8
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].13_1
[email protected].15_1
[email protected].14
[email protected].16
[email protected]
[email protected].12_1
[email protected].12_1
[email protected].13
[email protected].13
[email protected]
[email protected]
[email protected]
[email protected].4
[email protected].4_1
[email protected].5
[email protected].5
[email protected]_1
[email protected]
[email protected].44_1
[email protected].45
[email protected]
[email protected]
ostrio:[email protected]
ostrio:[email protected].2
[email protected].2_1
ostrio:[email protected].4
[email protected].3
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].7_1
[email protected].7_1
[email protected].12_1
[email protected].8
[email protected].8
[email protected].13
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].9_1
[email protected].10
[email protected]
2 changes: 1 addition & 1 deletion demo-simplest-streaming/client/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Template } from 'meteor/templating';

import { Videos, Images } from '../lib/files.collections.js';
import './main.html';

Template.file.helpers({
Expand Down
25 changes: 12 additions & 13 deletions demo-simplest-streaming/lib/files.collections.js
Original file line number Diff line number Diff line change
@@ -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;
}
Expand All @@ -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'
Expand All @@ -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');
}
}

export { Videos, Images }
1 change: 1 addition & 0 deletions demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
junk/
2 changes: 1 addition & 1 deletion demo/.meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ [email protected]
[email protected]
ostrio:[email protected]
ostrio:[email protected]
ostrio:[email protected].3
ostrio:[email protected].4
ostrio:[email protected]
ostrio:[email protected]
ostrio:[email protected]
Expand Down
4 changes: 2 additions & 2 deletions docs/constructor.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@
Allows to change default response headers
</td>
<td>
<a href="https://github.com/VeliovGroup/Meteor-Files/wiki/Custom-Responce-Headers#default-function">Default <em>Function</em></a>
<a href="https://github.com/VeliovGroup/Meteor-Files/wiki/Custom-Response-Headers#default-function">Default <em>Function</em></a>
</td>
<td>
We recommend to keep original function structure, with your modifications, see <a href="https://github.com/VeliovGroup/Meteor-Files/wiki/Custom-Responce-Headers#adding-custom-header-example">example altering default headers</a>
We recommend to keep original function structure, with your modifications, see <a href="https://github.com/VeliovGroup/Meteor-Files/wiki/Custom-Response-Headers#adding-custom-header-example">example altering default headers</a>
</td>
</tr>
<tr>
Expand Down
Loading

0 comments on commit 2a17242

Please sign in to comment.