mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-11-15 03:31:19 +03:00
Update Compress.php
This commit is contained in:
parent
83921ae1d3
commit
485b61991a
1 changed files with 8 additions and 1 deletions
|
@ -78,7 +78,14 @@ class Compress {
|
|||
if ($compressed_image_data) {
|
||||
file_put_contents($cache_filename, $compressed_image_data);
|
||||
} else {
|
||||
echo "Произошла ошибка при сжатии изображения.";
|
||||
$imageData = file_get_contents($_GET['url']);
|
||||
|
||||
$finfo = new \finfo(FILEINFO_MIME_TYPE);
|
||||
$mimeType = $finfo->buffer($imageData);
|
||||
|
||||
header("Content-Type: $mimeType");
|
||||
|
||||
echo $imageData;
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue