diff --git a/.versions b/.versions
index ce02017d..82425ee8 100644
--- a/.versions
+++ b/.versions
@@ -1,44 +1,43 @@
-babel-compiler@6.6.4
-babel-runtime@0.1.8
-base64@1.0.8
-blaze@2.1.7
-blaze-tools@1.0.8
-boilerplate-generator@1.0.8
-caching-compiler@1.0.4
+babel-compiler@6.8.3
+babel-runtime@0.1.9_1
+base64@1.0.9
+blaze@2.1.8
+blaze-tools@1.0.9
+boilerplate-generator@1.0.9
+caching-compiler@1.0.5_1
caching-html-compiler@1.0.6
-check@1.2.1
-coffeescript@1.0.17
+check@1.2.3
+coffeescript@1.1.2_1
deps@1.0.12
-diff-sequence@1.0.5
-ecmascript@0.4.3
-ecmascript-runtime@0.2.10
-ejson@1.0.11
-html-tools@1.0.9
-htmljs@1.0.9
-http@1.1.5
-id-map@1.0.7
-jquery@1.11.8
-logging@1.0.12
-meteor@1.1.14
-minifier-js@1.1.11
-modules@0.6.1
-modules-runtime@0.6.3
-mongo-id@1.0.4
-observe-sequence@1.0.11
-ostrio:cookies@2.0.2
-ostrio:files@1.5.6
-promise@0.6.7
-random@1.0.9
-reactive-var@1.0.9
-routepolicy@1.0.10
-sha@1.0.7
-spacebars@1.0.11
-spacebars-compiler@1.0.11
-templating@1.1.9
+diff-sequence@1.0.6
+ecmascript@0.4.6_1
+ecmascript-runtime@0.2.11_1
+ejson@1.0.12
+html-tools@1.0.10
+htmljs@1.0.10
+http@1.1.7
+id-map@1.0.8
+jquery@1.11.9
+logging@1.0.13_1
+meteor@1.1.15_1
+minifier-js@1.1.12_1
+modules@0.6.4
+modules-runtime@0.6.4_1
+mongo-id@1.0.5
+observe-sequence@1.0.12
+ostrio:cookies@2.0.4
+ostrio:files@1.6.0
+promise@0.7.2_1
+random@1.0.10
+reactive-var@1.0.10
+routepolicy@1.0.11
+spacebars@1.0.12
+spacebars-compiler@1.0.12
+templating@1.1.12_1
templating-tools@1.0.4
-tracker@1.0.13
+tracker@1.0.14
ui@1.0.11
-underscore@1.0.8
-url@1.0.9
-webapp@1.2.8
+underscore@1.0.9
+url@1.0.10
+webapp@1.2.9_1
webapp-hashing@1.0.9
diff --git a/README.md b/README.md
index fe81e43c..acb89e00 100644
--- a/README.md
+++ b/README.md
@@ -13,10 +13,16 @@ Support:
- [Releases / Changelog / History](https://github.com/VeliovGroup/Meteor-Files/releases)
- For more docs and examples [read wiki](https://github.com/VeliovGroup/Meteor-Files/wiki)
+Awards:
+========
+
+
+
Demo application:
========
- - [Live](https://meteor-files.herokuapp.com/) (*Unavailable after 6 hours of uptime, due to [free plan](https://www.heroku.com/pricing)*)
+ - [Live](https://files.veliov.com)
- [Source](https://github.com/VeliovGroup/Meteor-Files/tree/master/demo)
+ - [Compiled Demo App](https://github.com/VeliovGroup/Meteor-Files-Demo)
- [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/VeliovGroup/Meteor-Files-Demo)
ToC:
@@ -26,7 +32,7 @@ ToC:
- [Install](https://github.com/VeliovGroup/Meteor-Files#install)
- [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-client)
+ * [Upload file](https://github.com/VeliovGroup/Meteor-Files#insertsettings-autostart-client)
* [Stream files](https://github.com/VeliovGroup/Meteor-Files#stream-files)
* [Download Button](https://github.com/VeliovGroup/Meteor-Files#download-button)
@@ -34,9 +40,9 @@ Why `Meteor-Files`?
========
The `cfs` is a well known package, but it's huge monster which combines everything. In `Meteor-Files` is nothing to broke, it's simply upload/store/serve files to/from server.
- Support for both `HTTP` and `DDP` transports for upload
- - You need store to *GridFS*, *AWS* or *DropBox*? (*[Use third-party storage](https://github.com/VeliovGroup/Meteor-Files/wiki/Third-party-storage)*) - *Add it yourself*
+ - You need store to *[GridFS](https://github.com/VeliovGroup/Meteor-Files/wiki/GridFS-Integration)*, *[AWS S3](https://github.com/VeliovGroup/Meteor-Files/wiki/AWS-S3-Integration)* or *[DropBox](https://github.com/VeliovGroup/Meteor-Files/wiki/Third-party-storage)*? (*[Use 3rd-party storage](https://github.com/VeliovGroup/Meteor-Files/wiki/Third-party-storage)*) - *Add it yourself*
- You need to check file mime-type, size or extension? (*[`onBeforeUpload`](https://github.com/VeliovGroup/Meteor-Files/wiki/Constructor)*) - *Add it yourself*
- - You need to resize images after upload? (*[`onAfterUpload`](https://github.com/VeliovGroup/Meteor-Files/wiki/Constructor)*, *[file's subversions](https://github.com/VeliovGroup/Meteor-Files/wiki/Create-and-Manage-Subversions)*) - *Add it yourself*
+ - You need to [resize images](https://github.com/VeliovGroup/Meteor-Files/blob/master/demo/server/image-processing.coffee) after upload? (*[`onAfterUpload`](https://github.com/VeliovGroup/Meteor-Files/wiki/Constructor)*, *[file's subversions](https://github.com/VeliovGroup/Meteor-Files/wiki/Create-and-Manage-Subversions)*) - *Add it yourself*
Easy-peasy kids, *yeah*?
@@ -58,7 +64,7 @@ var Images = new FilesCollection({
allowClientCode: false, // Disallow remove files from Client
onBeforeUpload: function (file) {
// Allow upload files under 10MB, and only in png/jpg/jpeg formats
- if (file.size <= 10485760 && /png|jpg|jpeg/i.test(file.ext)) {
+ if (file.size <= 10485760 && /png|jpg|jpeg/i.test(file.extension)) {
return true;
} else {
return 'Please upload image, with size equal or less than 10MB';
@@ -72,7 +78,7 @@ if (Meteor.isClient) {
if (Meteor.isServer) {
Meteor.publish('files.images.all', function () {
- return Images.collection.find({});
+ return Images.find().cursor;
});
}
```
@@ -84,14 +90,12 @@ Read full docs for [`insert()` method](https://github.com/VeliovGroup/Meteor-Fil
Upload form (template):
```html
- {{#if currentUpload}}
- {{#with currentUpload}}
- Uploading {{file.name}}:
- {{progress}}%
- {{/with}}
+ {{#with currentUpload}}
+ Uploading {{file.name}}:
+ {{progress.get}}%
{{else}}
- {{/if}}
+ {{/with}}
```
@@ -145,15 +149,19 @@ For more expressive example see [Upload demo app](https://github.com/VeliovGroup
#### Stream files
-To display files you will use `fileURL` template helper.
+To display files you can use `fileURL` template helper or `.link()` method of `FileCursor`.
Template:
```html
-
+
+
+
```
@@ -175,10 +183,10 @@ if (Meteor.isServer) {
});
Meteor.publish('files.images.all', function () {
- return Images.collection.find({});
+ return Images.find().cursor;
});
Meteor.publish('files.videos.all', function () {
- return Videos.collection.find({});
+ return Videos.find().cursor;
});
} else {
@@ -191,10 +199,10 @@ Client's code:
```javascript
Template.file.helpers({
imageFile: function () {
- return Images.collection.findOne({});
+ return Images.findOne();
},
videoFile: function () {
- return Videos.collection.findOne({});
+ return Videos.findOne();
}
});
```
@@ -206,8 +214,8 @@ For more expressive example see [Streaming demo app](https://github.com/VeliovGr
Template:
```html
-
- {{fileRef.name}}
+
+ {{file.name}}
```
@@ -226,7 +234,7 @@ if (Meteor.isServer) {
});
Meteor.publish('files.images.all', function () {
- return Images.collection.find({});
+ return Images.find().cursor;
});
} else {
Meteor.subscribe('files.images.all');
@@ -237,12 +245,19 @@ Client's code:
```javascript
Template.file.helpers({
fileRef: function () {
- return Images.collection.findOne({});
+ return Images.findOne();
}
});
```
For more expressive example see [Download demo](https://github.com/VeliovGroup/Meteor-Files/tree/master/demo-simplest-download-button)
+
+Supporters:
+========
+Big thanks to all supporters. *Only because of this guys this project can have 100% of our attention*.
+ - [@themeteorchef](https://github.com/themeteorchef)
+ - [@MeDBejoHok](https://github.com/medbejohok)
+
----
| Meteor-Files | Expressive package to manage files within Meteor |
diff --git a/demo-simplest-download-button/.meteor/release b/demo-simplest-download-button/.meteor/release
index 940e0b5d..f80cc1ce 100644
--- a/demo-simplest-download-button/.meteor/release
+++ b/demo-simplest-download-button/.meteor/release
@@ -1 +1 @@
-METEOR@1.3.2.4
+METEOR@1.3.4.1
diff --git a/demo-simplest-download-button/.meteor/versions b/demo-simplest-download-button/.meteor/versions
index 07cf060b..1d07d958 100644
--- a/demo-simplest-download-button/.meteor/versions
+++ b/demo-simplest-download-button/.meteor/versions
@@ -3,76 +3,75 @@ aldeed:collection2-core@1.1.1
aldeed:schema-deny@1.0.1
aldeed:schema-index@1.0.1
aldeed:simple-schema@1.5.3
-allow-deny@1.0.4
-autoupdate@1.2.9
-babel-compiler@6.6.4
-babel-runtime@0.1.8
-base64@1.0.8
-binary-heap@1.0.8
-blaze@2.1.7
+allow-deny@1.0.5
+autoupdate@1.2.10
+babel-compiler@6.8.3
+babel-runtime@0.1.9_1
+base64@1.0.9
+binary-heap@1.0.9
+blaze@2.1.8
blaze-html-templates@1.0.4
-blaze-tools@1.0.8
-boilerplate-generator@1.0.8
-caching-compiler@1.0.4
+blaze-tools@1.0.9
+boilerplate-generator@1.0.9
+caching-compiler@1.0.5_1
caching-html-compiler@1.0.6
-callback-hook@1.0.8
-check@1.2.1
-coffeescript@1.0.17
+callback-hook@1.0.9
+check@1.2.3
+coffeescript@1.1.2_1
ddp@1.2.5
-ddp-client@1.2.7
-ddp-common@1.2.5
-ddp-server@1.2.6
+ddp-client@1.2.8_1
+ddp-common@1.2.6
+ddp-server@1.2.8_1
deps@1.0.12
-diff-sequence@1.0.5
-ecmascript@0.4.3
-ecmascript-runtime@0.2.10
-ejson@1.0.11
-es5-shim@4.5.10
-fastclick@1.0.11
-geojson-utils@1.0.8
+diff-sequence@1.0.6
+ecmascript@0.4.6_1
+ecmascript-runtime@0.2.11_1
+ejson@1.0.12
+es5-shim@4.5.12_1
+fastclick@1.0.12
+geojson-utils@1.0.9
hot-code-push@1.0.4
-html-tools@1.0.9
-htmljs@1.0.9
-http@1.1.5
-id-map@1.0.7
-jquery@1.11.8
-launch-screen@1.0.11
+html-tools@1.0.10
+htmljs@1.0.10
+http@1.1.7
+id-map@1.0.8
+jquery@1.11.9
+launch-screen@1.0.12
livedata@1.0.18
-logging@1.0.12
+logging@1.0.13_1
mdg:validation-error@0.2.0
-meteor@1.1.14
+meteor@1.1.15_1
meteor-base@1.0.4
-minifier-css@1.1.11
-minifier-js@1.1.11
-minimongo@1.0.16
+minifier-css@1.1.12_1
+minifier-js@1.1.12_1
+minimongo@1.0.17
mobile-experience@1.0.4
mobile-status-bar@1.0.12
-modules@0.6.1
-modules-runtime@0.6.3
-mongo@1.1.7
-mongo-id@1.0.4
-npm-mongo@1.4.43
-observe-sequence@1.0.11
-ordered-dict@1.0.7
-ostrio:cookies@2.0.2
-ostrio:files@1.5.1
-promise@0.6.7
+modules@0.6.4
+modules-runtime@0.6.4_1
+mongo@1.1.9_1
+mongo-id@1.0.5
+npm-mongo@1.4.44_1
+observe-sequence@1.0.12
+ordered-dict@1.0.8
+ostrio:cookies@2.0.4
+ostrio:files@1.6.0
+promise@0.7.2_1
raix:eventemitter@0.1.3
-random@1.0.9
-reactive-var@1.0.9
-reload@1.1.8
-retry@1.0.7
-routepolicy@1.0.10
-sha@1.0.7
-spacebars@1.0.11
-spacebars-compiler@1.0.11
-standard-minifier-css@1.0.6
-standard-minifier-js@1.0.6
-templating@1.1.9
+random@1.0.10
+reactive-var@1.0.10
+reload@1.1.10
+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
templating-tools@1.0.4
-tracker@1.0.13
+tracker@1.0.14
ui@1.0.11
-underscore@1.0.8
-url@1.0.9
-webapp@1.2.8
+underscore@1.0.9
+url@1.0.10
+webapp@1.2.9_1
webapp-hashing@1.0.9
diff --git a/demo-simplest-download-button/client/main.html b/demo-simplest-download-button/client/main.html
index 2c8c9ad0..d8eeb3b0 100644
--- a/demo-simplest-download-button/client/main.html
+++ b/demo-simplest-download-button/client/main.html
@@ -10,11 +10,11 @@