Bugfix in deleting wishes
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
Reference in New Issue
Block a user