0

I need to show the status of file upload to servlet in the browser, how can this be acheived without using any libraries like jquery, what are the various options for doing this and which one is the best?

Best Regards,
Keshav

keshav84
  • 2,291
  • 5
  • 25
  • 34

1 Answers1

0

Without using any add-ons at all, you can't, at least not in all currently-popular browsers. There are some Flash-based uploaders that can do it, and in some newer browsers there's an HTML5-related file API that could be used. In older browsers (IE), you have no access at all to the client-side filesystem, so your Javascript code won't have any idea of the file size.

Pointy
  • 405,095
  • 59
  • 585
  • 614
  • when an add-on or applet is downloaded the user is asked for the confirmation if he trusts the addon and if he wants the addon to access his system, but in case of gmail or when uploading images i dont get any browser warnings, how does google do it in this case? – keshav84 Sep 06 '10 at 05:37
  • Uploading and downloading are not the same thing. Uploading doesn't change the user's system. There are security mechanisms in the browser that prevent a site from manipulating a "file" input. – Pointy Sep 06 '10 at 12:18