Re: [PHP] a clean way to upload

2004-01-16 Thread David T-G
Matt -- ...and then Matt Hedges said... % % Hello all, % After playing around with the options, I've found that the following method % for uploading something with constraints is the easiest... I don't get it... You have to upload in order to get to the server, so all you're doing is returning

Re: [PHP] a clean way to upload

2004-01-16 Thread David T-G
Matt -- ...and then Matt Hedges said... % % ? He's telling you to search the list archives. This is not new ground you're breaking here. Just call getimagesize() on the temp file and see what type it reports back. HTH & HAND :-D -- David T-G * There is too much animal

Re: [PHP] a clean way to upload

2004-01-16 Thread Matt Hedges
? "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Friday 16 January 2004 23:55, Matt Hedges wrote: > > > How would I do that? I mean, what would I put instead of > > > > > > if ($_FILES['imagefile']['type'] != "image/pjpeg") > > > > the browser sets, it is more reli

Re: [PHP] a clean way to upload

2004-01-16 Thread Jason Wong
On Friday 16 January 2004 23:55, Matt Hedges wrote: > How would I do that? I mean, what would I put instead of > > > > if ($_FILES['imagefile']['type'] != "image/pjpeg") > > the browser sets, it is more reliable to get the image type from > > getimagesize(). -- Jason Wong -> Gremlins Associate

Re: [PHP] a clean way to upload

2004-01-16 Thread Matt Hedges
Thanks Jason. How would I do that? I mean, what would I put instead of > > if ($_FILES['imagefile']['type'] != "image/pjpeg") thanks "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Friday 16 January 2004 10:32, Matt Hedges wrote: > > > if ($_FILES['imagefile']['t

Re: [PHP] a clean way to upload

2004-01-15 Thread Jason Wong
On Friday 16 January 2004 10:32, Matt Hedges wrote: > if ($_FILES['imagefile']['type'] != "image/pjpeg") The 'type' in $_FILES is provided by the browser. IIRC only IE uses "image/pjpeg" whilst other browsers use "image/jpeg". But regardless of what the browser sets, it is more reliable to ge

[PHP] a clean way to upload

2004-01-15 Thread Matt Hedges
Hello all, After playing around with the options, I've found that the following method for uploading something with constraints is the easiest... The sample below first checks for 3 constraints (jpg, size, and width) and if it is cool it uploads it but renames it first...