henkealf wrote:Do I have to move_uploaded_file from the php temp dir before I can show it on a page
For your answer, I quote the manual page [man]features.file-upload[/man]:
The file will be deleted from the temporary directory at the end of the request if it has not been moved away or renamed.
What you could do instead is move the uploaded file to your own temporary directory, then have a separate PHP script that outputs image data and then unlink()'s that image.
That way, you'd move the file, and output:
<img src="image.php?file=imageName.jpg">
Then, in your image.php script, you'd do something like:
if(empty($_GET['file']))
die('No image specified.');
else
$path = basename($_GET['file']);
// output appropriate headers, readfile() the image ($path), then unlink() it