显示文件上传的进度条 [英] Displaying progressbar for file upload
本文介绍了显示文件上传的进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要创建一个应用程序,我可以在其中添加要上传的文件.当我添加要上传的项目时,应该与添加的每个项目一起显示一个进度条.当我点击文件上传时,每个文件的文件上传进度应该反映在进度条中.进度应该使用像
这样的函数<代码>.....addEventListener(ProgressEvent.Progress, uploadProgressHandler);私有函数 uploadProgressHandler(event:ProgressEvent):void{var numPerc:Number = Math.round((Number(event.bytesLoaded)/Number(event.bytesTotal)) * 100);//this.progBar.validateNow();.....}
有人可以帮我吗?
解决方案
查看这些示例:
看起来像这样:
I need to create an application where I can add files for upload. As I add items for upload, a progressbar should be displayed along with each item added. And when I click for file upload, the progress of file upload for each file should be reflected in the progress bar. The progress should use the function like
.....
addEventListener(ProgressEvent.Progress, uploadProgressHandler);
private function uploadProgressHandler(event:ProgressEvent):void
{
var numPerc:Number = Math.round((Number(event.bytesLoaded) / Number(event.bytesTotal)) * 100);
//this.progBar.validateNow();
.....
}
Can anyone provide help me out?
解决方案
See these examples:
Multiple File Upload with Flex and PHP
which looks like this:
Multiple File Upload With Progress Bar Using Flash and ASP.NET
which looks like this:
这篇关于显示文件上传的进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文