RE: [PHP] Quick imageSize question

2004-10-14 Thread Ford, Mike
To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm



On 13 October 2004 16:12, Mag wrote:

> Hey,
> 
> Dont worry about talking crap, I took that risk when I
> started this thread :-) I was hopeing that maybe the
> image would have the info incoded in it which php
> could read before going through the uploador
> something like that.

Your PHP script doesn't even get started until *after* all file uploads have
been completed, so that line of thought is a complete non-starter.  The only
place you're going to have a chance of checking the image size before it
gets uploaded is in the browser using JavaScript (or an embedded applet in
some other language such as Java).

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Quick imageSize question

2004-10-13 Thread Mag
Hey,

Dont worry about talking crap, I took that risk when I
started this thread :-) I was hopeing that maybe the
image would have the info incoded in it which php
could read before going through the uploador
something like that.

I too am not really sure if its possible, but am
hopeing the "big boys" on the list who have worked on
stuff like this for a long time will confirm it.

Thanks,
Mag

> Hello,
> that's usually not possible because your webserver
> can't access the image
> on your computer; a possible solution might be to
> determine the image size
> via javascript and submit it with the form, so you
> can accept or deny the
> image upload in your php script - problem: with
> javascript running on client
> side, this is not foolproof. Anyways i don't know
> exactly how to solve it with
> javascript even, so please correct me, if i'm
> talking crap here.
> 
> Best regards,
> 
> -sd
> 
> On Wed, Oct 13, 2004 at 07:37:29AM -0700, Mag wrote:
> > The problem with the above is I can only get the
> > dimensions AFTER the file has been uploaded and is
> on
> > disk,which is quite a pain in the ... coz I want
> to
> > accept only images that are smaller than x pixels
> > width and then i have to tell the client that
> their
> > upload failed coz their image is too big...is
> there
> > any way to get the dimensions before the upload is
> > done?
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


=
--
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)



__
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Quick imageSize question

2004-10-13 Thread Stefan Dengscherz
Hello,
that's usually not possible because your webserver can't access the image
on your computer; a possible solution might be to determine the image size
via javascript and submit it with the form, so you can accept or deny the
image upload in your php script - problem: with javascript running on client
side, this is not foolproof. Anyways i don't know exactly how to solve it with
javascript even, so please correct me, if i'm talking crap here.

Best regards,

-sd

On Wed, Oct 13, 2004 at 07:37:29AM -0700, Mag wrote:
> The problem with the above is I can only get the
> dimensions AFTER the file has been uploaded and is on
> disk,which is quite a pain in the ... coz I want to
> accept only images that are smaller than x pixels
> width and then i have to tell the client that their
> upload failed coz their image is too big...is there
> any way to get the dimensions before the upload is
> done?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php