[英]Ng-file-upload show upload indicator
我正在使用ng-file-upload,并希望在上传过程中显示上传指示符,但我在文档中没有找到执行此操作的方法,但是可能有办法吗?
Even I was looking for a directive and tried using this one but then I moved to a better one that worked for me and was easy to configur and use and documentation and demos are enough to get the things right 甚至我都在寻找一种指令并尝试使用该指令,但是后来我转到了一个对我有用的指令,易于配置和使用,文档和演示足以使事情变得正确。
Look at this directive: https://github.com/nervgh/angular-file-upload 查看此指令: https : //github.com/nervgh/angular-file-upload
The third argument of the then method has the progress. then方法的第三个参数具有进度。
Upload.upload({
url: 'upload/url',
}).then(function (resp) {
....
}, function (resp) {
....
}, function (evt) {
var progressPercentage = parseInt(100.0 * evt.loaded / evt.total);
console.log('progress: ' + progressPercentage + '% ' + evt.config.data.file.name);
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.