简体   繁体   English

上载文件时显示进度栏

[英]Display Progress Bar while Uploading Files

I am working on a project in which I have to implement file upload functionality, User will upload the file, while uploading I have to do two things 1: Send Email to admin 2: Make Zip file of uploaded file. 我正在一个必须实现文件上传功能的项目中,用户将上传文件,而上传时我必须做两件事:1:向管理员发送电子邮件2:制作上传文件的Zip文件。

I have to show Progress bar during these 2 processes like below 我必须在这两个过程中显示进度条,如下所示

在此处输入图片说明

I have tried using this but it doesn't support manually start on button click event. 我尝试使用此方法,但它不支持在按钮单击事件上手动启动。 How can I Implement this functionality 如何实现此功能

You will have to start it in a new thread and when the process is done you will have to stop it. 您将不得不在一个新线程中启动它,并且当该过程完成时,您将不得不停止它。 Use a session variable to control if its started or finished. 使用会话变量控制其开始还是结束。

您可以为此使用第三方上传控件,例如SlickUpload

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM