im working on a basic image upload system. So far im using the class_upload.php from verot which is working great.
I have basic-auth protected the directory where the Images are safed for now.
However i would like to display the recently uploaded image on the upload-page.
This should be simple i thought using this code
if ($imageFileType == "jpg") {
echo "<img src=https://USER:PASS@mywebsite.de/uploads/" . $bildname . ".jpg> </img>";
} elseif ($imageFileType == "jpeg"){
echo "<img src=https://USER:PASS@mywebsite.de/uploads/" . $bildname . ".jpeg> </img>";
} elseif ($imageFileType == "png") {
echo "<img src=https://USER:PASS@mywebsite.de/uploads/" . $bildname . ".png> </img>";
} elseif ($imageFileType == "gif") {
echo "<img src=https://USER:PASS@mywebsite.de/uploads/" . $bildname . ".gif> </img>";
}
Where $bildname is obviously the (correct) name of the new file. However when i upload an image, it only show that basic "image icon" when there couldnt be an propper image displayed.
Using the link "https://USER:PASS@mywebsite.de/....." directly on the webbrowser, opens the image though.
Can anyone recommend a fix or another work around to my problem?