Bugfix in deleting wishes

This commit is contained in:
2022-11-28 16:54:28 +01:00
parent 27ec06033a
commit 05f11a18cd
2 changed files with 4 additions and 4 deletions

View File

@@ -25,9 +25,9 @@ $headers = array_change_key_case(get_headers($ItemImage, 1), CASE_LOWER);
if (strpos($headers['content-type'], 'image/') !== false) {
$strippedimagepath = strtok($ItemImage, '?');
$imageLocalLink = $imagedir . '/' . uniqid() . '.' . pathinfo($strippedimagepath, PATHINFO_EXTENSION);
$imageLocalLink = uniqid() . '.' . pathinfo($strippedimagepath, PATHINFO_EXTENSION);
echo "ImageLink: " . $imageLocalLink;
file_put_contents($imageLocalLink, fopen($strippedimagepath, 'r'));
file_put_contents($imagedir . '/' . $imageLocalLink, fopen($strippedimagepath, 'r'));
} else {
echo "Link is Not an Image";
}