Skip to content

Commit 39d0a4f

Browse files
author
pemrouz
committed
doc: update README
1 parent d19a416 commit 39d0a4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![Coverage Status](https://coveralls.io/repos/rijs/upload/badge.svg?branch=master&service=github)](https://coveralls.io/github/rijs/upload?branch=master)
33
[![Build Status](https://travis-ci.org/rijs/upload.svg)](https://travis-ci.org/rijs/upload)
44

5-
This module makes uploading forms nicer to deal with. In particlar, it turns `type="file"` elements into a native Stream (with backpressure and all) on the server-side so you can then simply pipe them.
5+
This module aims to make uploading forms nicer to deal with. Given a `<form>`, you can get a sensible JSON object on the server side where the keys are the `[name]` attribute of each control. In particlar, it turns `type="file"` elements into an array of native Streams (with backpressure and all) so you can then simply pipe them.
66

77
First, use [utilise/form](https://github.com/utilise/utilise#--form) to turn your form element into a simple plain JSON object.
88

@@ -18,7 +18,7 @@ ripple.upload('resource', values)
1818
.on('progress', response => ...)
1919
```
2020

21-
The `resource` identifies which handler to use on the server-side. For example, let's say you registered an `events` resource, then its `from` function would receive the upload. Complete example:
21+
The `resource` identifies which handler to use on the server-side. For example, let's say you registered an `events` resource, then its `from` function would receive the upload. Complete example below and [see the example/test for a real example](https://github.com/rijs/upload/blob/master/test):
2222

2323
```html
2424
<form>

0 commit comments

Comments
 (0)