The moose likes HTML, CSS and JavaScript and the fly likes How to get the file size before Uploading the file? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "How to get the file size before Uploading the file?" Watch "How to get the file size before Uploading the file?" New topic
Author

How to get the file size before Uploading the file?

santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Posts: 295
Dear All

I want to check the file size before Uploading the file using Java Script that should be compatable with Mozilla and IE....

This message was edited 1 time. Last update was at by Bear Bibeault



Creativity is nothing but Breaking Rules
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 14853
Sorry to say that JavaScript does not have this built in.

You wold have to use applets and/or activeX to do it.

Eric
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 799
if you are uploading, then you are using server sided code, becaue i dont think you can use ajax to upload a file.
so in what ever server language you're using, get the file via $_POST or whatever and check the file size there... you can also set a maximum file size on forms too.

Justin


You down with OOP? Yeah you know me!
 
 
subject: How to get the file size before Uploading the file?
 
developer file tools