0.3.0 • Published 11 years ago
component-upload v0.3.0
upload
file upload and progress api
Installation
$ component install component/uploadEvents
erroran error occurredabortupload was abortedprogress(e) upload in progress (e.percent,e.totalSizeetc)endupload is complete
API
Upload(file)
Initialize an Upload with the given file, where file
is a File object, for example from a input.files[0] FileList.
var upload = new Upload(file);
var upload = Upload(file);Upload#to(path, fn)
POST the multipart upload to path and invoke fn(err, res).
upload.to('/upload');
upload.on('progress', reportProgress);
upload.on('end', done);Running tests
Run the Express test server:
$ npm install
$ make testLicense
MIT
0.3.0
11 years ago