|
-
Jan 29th, 2007, 01:59 PM
#1
Thread Starter
Banned
Possible to let the user know the image is too large
Technically I do not think its possible but thought I would ask. I have a form that contains multiple image upload fields, in the description we ask that the images size be smaller than 1mb but most people simple do not know how to check this.
Typically people will load each of the 5 image fields with an image over 2mb and wonder why the page timed-out or is blank after a couple of minutes.
Can PHP or something check this before the form gets rolling, then warn them about the size or time it will take to load these images?
Last edited by si_the_geek; Feb 5th, 2007 at 01:22 PM.
Reason: removed advertising links
-
Jan 29th, 2007, 05:49 PM
#2
Re: Possible to let the user know the image is too large
No, PHP can't do it. The PHP page processing starts only after everything has been uploaded.
However, there's a special hidden field you can use to give the browser a hint to disallow images over a certain size. I forgot the name.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 29th, 2007, 07:14 PM
#3
Re: Possible to let the user know the image is too large
it's called max_file_size, and you can use it like this:
Code:
<input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|