Skip to content

Commit 91a5ff6

Browse files
committed
v1.0.9
- Docs update, closing #9 and #10 - Dependencies update
1 parent 5693174 commit 91a5ff6

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

.versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ mongo-id@1.0.5
4141
npm-mongo@1.5.45
4242
observe-sequence@1.0.12
4343
ordered-dict@1.0.8
44-
ostrio:autoform-files@1.0.8
44+
ostrio:autoform-files@1.0.9
4545
ostrio:cookies@2.0.5
46-
ostrio:files@1.7.5
46+
ostrio:files@1.7.6
4747
promise@0.8.3
4848
random@1.0.10
4949
reactive-dict@1.1.3

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Upload and manage files with autoForm via [`ostrio:files`](https://github.com/Ve
1212
```javascript
1313
var Images = new FilesCollection({
1414
collectionName: 'Images',
15-
allowClientCode: false, // Disallow remove files from Client,
15+
allowClientCode: true, // Required to let you remove uploaded file
1616
onBeforeUpload: function (file) {
1717
// Allow upload files under 10MB, and only in png/jpg/jpeg formats
1818
if (file.size <= 10485760 && /png|jpg|jpeg/i.test(file.ext)) {
@@ -80,18 +80,20 @@ Generate the form with `{{> quickform}}` or `{{#autoform}}` e.g.:
8080

8181
```html
8282
{{#if Template.subscriptionsReady }}
83-
{{> quickForm collection="Posts" type="update" doc=getPost}}
83+
{{> quickForm collection="Posts" type="update" doc=getPost}}
8484
{{/if}}
8585
<!-- OR -->
8686
{{#if Template.subscriptionsReady }}
87-
{{#autoForm collection="Posts" type="update" doc=getPost}}
88-
{{> afQuickField name="title"}}
89-
{{> afQuickField name="picture"}}
90-
<button type="submit" class="btn btn-primary">Update</button>
91-
{{/autoForm}}
87+
{{#autoForm collection="Posts" type="update" doc=getPost}}
88+
{{> afQuickField name="title"}}
89+
{{> afQuickField name="picture"}}
90+
<button type="submit" class="btn btn-primary">Update</button>
91+
{{/autoForm}}
9292
{{/if}}
9393
```
94-
Autoform should be wrapped in **{{#if Template.subscriptionsReady }}** which makes sure that template level subscription is ready. Without it the picture preview won't be shown. You can see update mode example [here](https://github.com/VeliovGroup/meteor-autoform-file/issues/9).
94+
95+
Autoform should be wrapped in `{{#if Template.subscriptionsReady }}` which makes sure that template level subscription is ready. Without it the picture preview won't be shown. You can see update mode example [here](https://github.com/VeliovGroup/meteor-autoform-file/issues/9).
96+
9597
### Multiple images //does not support yet
9698
If you want to use an array of images inside you have to define the autoform on on the [schema key](https://github.com/aldeed/meteor-simple-schema#schema-keys)
9799

@@ -161,4 +163,4 @@ picture: {
161163
<template name="myFilePreview">
162164
<a href="{{file.link}}">{{file.original.name}}</a>
163165
</template>
164-
```
166+
```

package.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package.describe({
22
name: "ostrio:autoform-files",
33
summary: "File upload for AutoForm using ostrio:files",
44
description: "File upload for AutoForm using ostrio:files",
5-
version: "1.0.8",
5+
version: "1.0.9",
66
git: "https://github.com/VeliovGroup/meteor-autoform-file.git"
77
});
88

@@ -15,7 +15,7 @@ Package.onUse(function(api) {
1515
'reactive-var',
1616
'templating',
1717
'aldeed:autoform@5.8.1',
18-
'ostrio:files@1.7.5'
18+
'ostrio:files@1.7.6'
1919
]);
2020

2121
api.addFiles([

0 commit comments

Comments
 (0)