You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+6-5
Original file line number
Diff line number
Diff line change
@@ -97,8 +97,9 @@ import { FilesCollection } from 'meteor/ostrio:files';
97
97
98
98
FAQ:
99
99
========
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.
102
103
* On `production`: `yourProdAppDir/programs/server`
103
104
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))
104
105
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):
143
144
```html
144
145
<templatename="uploadForm">
145
146
{{#with currentUpload}}
146
-
Uploading <b>{{file.name}}</b>:
147
+
Uploading <b>{{file.name}}</b>:
147
148
<spanid="progress">{{progress.get}}%</span>
148
149
{{else}}
149
150
<inputid="fileInput"type="file" />
@@ -171,7 +172,7 @@ Template.uploadForm.helpers({
171
172
Template.uploadForm.events({
172
173
'change #fileInput':function (e, template) {
173
174
if (e.currentTarget.files&&e.currentTarget.files[0]) {
174
-
// We upload only one file, in case
175
+
// We upload only one file, in case
175
176
// multiple files were selected
176
177
var upload =Images.insert({
177
178
file:e.currentTarget.files[0],
@@ -336,4 +337,4 @@ I would like to thank everyone who support this project. *Because of those guys
336
337
337
338
| Meteor-Files | Expressive package to manage files within Meteor |
338
339
|:-------------:|:------------- |
339
-
|[](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 /> [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FVDSXRFW9VGA2)|
340
+
|[](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 /> [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FVDSXRFW9VGA2)|
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.
0 commit comments