【文件属性】:
文件名称:upload:文件上传和进度api
文件大小:26KB
文件格式:ZIP
更新时间:2021-06-19 15:39:24
JavaScript
上传
文件上传和进度api
安装
$ component install component/upload
活动
error发生错误
abort上传已中止
progress (e) 上传中 ( e.percent , e.totalSize等)
end上传完成
应用程序接口
上传文件)
使用给定的file初始化Upload ,其中file是一个File对象,例如来自input.files[0] FileList 。
var upload = new Upload ( file ) ;
var upload = Upload ( file ) ;
上传#to(路径,[fn])
POST多部分上传path和调用fn(err, res)
upload . to ( '/upload' ) ;
upload . on ( 'progress' , reportProgress )
【文件预览】:
upload-master
----Readme.md(798B)
----test()
--------tests.html(463B)
--------mocha.css(3KB)
--------server.js(575B)
--------mocha.js(91KB)
--------tests.js(2KB)
----History.md(651B)
----Makefile(182B)
----component.json(300B)
----.gitignore(30B)
----index.js(2KB)
----package.json(408B)