upload
file upload and progress api
Installation
$ component install component/upload
Events
error
an error occurredabort
upload was abortedprogress
(e) upload in progress (e.percent
,e.totalSize
etc)end
upload 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 = file;var upload = ;
Upload#to(path, [fn])
POST the multipart upload to path
and invoke fn(err, res)
.
upload;upload;upload;
Running tests
Run the Express test server:
$ npm install
$ make test
License
MIT