Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I check size of file for (input type=file ?

Status
Not open for further replies.

martindavey

Programmer
Jan 2, 2000
122
GB
I have an input type=file in my form.
When the user selects a file, I want to check that it meets my criteria:

eg.
must be 150x150 pixels in size,
must be less than 150kb in size
must be gif/jpg/bmp/pcx/tif/png
must not exist already.
 
So you are going to check it with a server? You can use SSI to check file size:

<!--#fsize file=&quot;yourfile&quot; -->

this returns kilobytes. I am not sure how you would implement this though without saving it first. Perhaps you could write an Applet? You would need client access then though.
b2 - benbiddington@surf4nix.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top