2

I need to calculate file size using javascript before the file starts to upload in server size. I need do the file size operation in client size itself.

Pls help me guys.,

Thanks..

Arun
  • 1,644
  • 9
  • 25
  • 41
  • You can do this in newer browsers with the HTML5 file APIs, but not in older browsers unless you use Flash or something. – Pointy Mar 13 '12 at 10:53
  • @EvilP: i have tried a code which had been posted in a site. http://www.kavoir.com/2009/01/check-for-file-size-with-javascript-before-uploading.html. it is working in IE but it is asking for ActiveX Control. It is not supported in Chrome and Safari... – Arun Mar 13 '12 at 10:56
  • http://stackoverflow.com/questions/4112575/client-checking-file-size-using-html5 – Balaswamy Vaddeman Mar 13 '12 at 11:02

2 Answers2

3

New APIs in HTML5 will allow you to interact with files - so you need the users to be on latest browsers for this to work:

jquery File Upload

Aliostad
  • 80,612
  • 21
  • 160
  • 208
0

HTML5 will helpful for you. check the similar question on stackoverflow

check this also

Community
  • 1
  • 1
Balaswamy Vaddeman
  • 8,360
  • 3
  • 30
  • 40