Skip to content

Commit 7afa0b6

Browse files
authored
Merge pull request veliovgroup#255 from elewis33/dev
Doc update
2 parents 41190ac + 2841511 commit 7afa0b6

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ import { FilesCollection } from 'meteor/ostrio:files';
9797

9898
FAQ:
9999
========
100-
1. __Where files is stored by default?__: by default if `config.storagePath` isn't passed into [*Constructor*](https://github.com/VeliovGroup/Meteor-Files/wiki/Constructor) it's equals to `assets/app/uploads` and relative to running script:
101-
* On `development` stage: `yourDevAppDir/.meteor/local/build/programs/server`, note: __all files will be removed as soon as your application will rebuild__ or you run `meteor reset`. To keep you storage persistent use absolute path *outside of your project folder*, we recommend to use `/data` directory
100+
1. __Where are files stored by default?__: by default if `config.storagePath` isn't passed into [*Constructor*](https://github.com/VeliovGroup/Meteor-Files/wiki/Constructor) it's equals to `assets/app/uploads` and relative to running script:
101+
* On `development` stage: `yourDevAppDir/.meteor/local/build/programs/server`
102+
> __Note: All files will be removed as soon as your application rebuilds__ or you run `meteor reset`. To keep your storage persistent during development use an absolute path *outside of your project folder*, e.g. `/data` directory.
102103
* On `production`: `yourProdAppDir/programs/server`
103104
2. __How to pause/continue upload and get progress/speed/remaining time?__: see *Object* returned from [`insert` method](https://github.com/VeliovGroup/Meteor-Files/wiki/Insert-(Upload))
104105
3. When using any of `accounts` packages - package `accounts-base` must be explicitly added to `.meteor/packages` above `ostrio:files`
@@ -143,7 +144,7 @@ Upload form (template):
143144
```html
144145
<template name="uploadForm">
145146
{{#with currentUpload}}
146-
Uploading <b>{{file.name}}</b>:
147+
Uploading <b>{{file.name}}</b>:
147148
<span id="progress">{{progress.get}}%</span>
148149
{{else}}
149150
<input id="fileInput" type="file" />
@@ -171,7 +172,7 @@ Template.uploadForm.helpers({
171172
Template.uploadForm.events({
172173
'change #fileInput': function (e, template) {
173174
if (e.currentTarget.files && e.currentTarget.files[0]) {
174-
// We upload only one file, in case
175+
// We upload only one file, in case
175176
// multiple files were selected
176177
var upload = Images.insert({
177178
file: e.currentTarget.files[0],
@@ -336,4 +337,4 @@ I would like to thank everyone who support this project. *Because of those guys
336337

337338
| Meteor-Files | Expressive package to manage files within Meteor |
338339
|:-------------:|:------------- |
339-
| [![logo](https://raw.githubusercontent.com/VeliovGroup/Meteor-Files/master/logo-bw.png)](https://github.com/VeliovGroup/Meteor-Files) | If you found this package useful, please do not hesitate to star it at both [GitHub](https://github.com/VeliovGroup/Meteor-Files) and [Atmosphere](https://atmospherejs.com/ostrio/files). Also you may like to [Tweet](https://twitter.com/share?url=https%3A%2F%2Fgithub.com%2FVeliovGroup%2FMeteor-Files&text=File%20upload%20and%20delivery%20in%20Meteorjs%20-%20now%20it's%20easy!) about it or share at [Facebook](https://www.facebook.com/sharer.php?u=https%3A%2F%2Fgithub.com%2FVeliovGroup%2FMeteor-Files) <br /> [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FVDSXRFW9VGA2) |
340+
| [![logo](https://raw.githubusercontent.com/VeliovGroup/Meteor-Files/master/logo-bw.png)](https://github.com/VeliovGroup/Meteor-Files) | If you found this package useful, please do not hesitate to star it at both [GitHub](https://github.com/VeliovGroup/Meteor-Files) and [Atmosphere](https://atmospherejs.com/ostrio/files). Also you may like to [Tweet](https://twitter.com/share?url=https%3A%2F%2Fgithub.com%2FVeliovGroup%2FMeteor-Files&text=File%20upload%20and%20delivery%20in%20Meteorjs%20-%20now%20it's%20easy!) about it or share at [Facebook](https://www.facebook.com/sharer.php?u=https%3A%2F%2Fgithub.com%2FVeliovGroup%2FMeteor-Files) <br /> [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FVDSXRFW9VGA2) |

docs/constructor.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@
6060
<code>defaultPath</code> - Default recommended path
6161
</li>
6262
</ul>
63-
Context is current <em>FilesCollction</em> instance
63+
Context is current <em>FilesCollction</em> instance.<br /><br />
64+
Note: When running in development mode files stored at a relative path (within the Meteor project) are silently removed when Meteor is restarted.<br /><br />
65+
To preserve files in development mode store them outside of the Meteor application, e.g. `/data/Meteor/uploads/`<br /><br />
66+
The Meteor-Files package operates on the host filesystem, unlike Meteor Assets. When a relative path is specified for `config.storagePath` (path starts with ./ or no slash) files will be located relative to the assets folder.<br /><br /> When an absolute path is used (path starts with /) files will be located starting at the root of the filesystem.
6467
</td>
6568
</tr>
6669
<tr>

0 commit comments

Comments
 (0)