Page 1 of 1

Viewing uploaded images

Posted: Thu Nov 20, 2008 7:59 am
by SeLF85
Is there anyway I can view my uploaded images without having to save them to a folder.

Re: Viewing uploaded images

Posted: Thu Nov 20, 2008 4:30 pm
by infolock
you can by using something like the GD Library.

Re: Viewing uploaded images

Posted: Thu Nov 20, 2008 4:35 pm
by Syntac

Code: Select all

header("Content-type: image/png"); // Change to appropriate MIME type
readfile($FILES["the_uploaded_image"]["tmp_name"]);
Or something.

Re: Viewing uploaded images

Posted: Thu Nov 20, 2008 6:13 pm
by Eran
Just bear in mind you'll lose the ability to save them later. Once the script ends, the temporary files are usually deleted.