mirror of
https://github.com/claradex/nativegallery.git
synced 2024-12-22 08:30:56 +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