开发者

Implementing file upload progress in JS

开发者 https://www.devze.com 2023-04-12 10:46 出处:网络
How can javascript know file upload progress?Is there some kind of standard communication method between the browser and the server that tracks progr开发者_如何学运维ess and sends progress status back

How can javascript know file upload progress? Is there some kind of standard communication method between the browser and the server that tracks progr开发者_如何学运维ess and sends progress status back to the browser, or can it be done entirely from within javascript?

If it makes a difference I am using a JVM backend.

Thanks!


There are lots of solutions for this. Generally, javascript on its own has no notion of bytes being transferred, so you need to use AJAX to get back the percentage of bytes transferred. Here's a tutorial for JSP. Other solutions use flash.


It's impossible. You can however do something like this

http://www.ajaxf1.com/tutorial/ajax-file-upload-tutorial.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号