prismofeverything
prismofeverything

Reputation: 9049

Implementing file upload progress in JS

How can javascript know file upload progress? Is there some kind of standard communication method between the browser and the server that tracks progress 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!

Upvotes: 1

Views: 2389

Answers (2)

Roland Mai
Roland Mai

Reputation: 31077

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.

Upvotes: 2

Phillip Burch
Phillip Burch

Reputation: 459

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

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

Upvotes: 0

Related Questions