jQuery in Action
[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Reply Bookmark it! Watch this topic JavaRanch » Forums » Engineering » HTML and JavaScript
 
RSS feed
 
New topic
Author

How to get the file size before Uploading the file?

santhosh.R gowda
Ranch Hand

Joined: Apr 06, 2009
Messages: 265

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
Sheriff

Joined: Nov 08, 2001
Messages: 13577

Sorry to say that JavaScript does not have this built in.

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

Eric

Race Schedule for 2010 for this running geek:
* National Half Marathon - 03/20 * Frederick Marathon - 05/02 * Baltimore Marathon - 10/16 *
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Messages: 782

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!
 
jQuery in Action
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Engineering » HTML and JavaScript
 
RSS feed
 
New topic
hibernate profiler