file upload and progress api
npm install upload-componentfile upload and progress api
$ component install component/upload
- error an error occurred
- progress (e) upload in progress (e.percent, e.totalSize etc)
- end upload is complete
Initialize an Upload with the given file, where file
is a File object, for example from a input.files[0] FileList.
``js`
var upload = new Upload(file);
var upload = Upload(file);
__POST__ the multipart upload to path.
`js`
upload.to('/upload');
upload.on('progress', reportProgress);
upload.on('end', done);
Run the Express test server:
```
$ npm install
$ make test
MIT