diff --git a/README.md b/README.md index 9e66afe..2c08db5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Coverage Status](https://coveralls.io/repos/rijs/upload/badge.svg?branch=master&service=github)](https://coveralls.io/github/rijs/upload?branch=master) [![Build Status](https://travis-ci.org/rijs/upload.svg)](https://travis-ci.org/rijs/upload) -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. +This module aims to make uploading forms nicer to deal with. Given a `
`, 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. First, use [utilise/form](https://github.com/utilise/utilise#--form) to turn your form element into a simple plain JSON object. @@ -18,7 +18,7 @@ ripple.upload('resource', values) .on('progress', response => ...) ``` -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: +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): ```html