mimetype hotfix

This commit is contained in:
Čarodej
2022-04-25 20:10:41 +02:00
parent 7be7203b96
commit 5e9e4142d0

View File

@@ -762,6 +762,12 @@ if (! function_exists('readExifData')) {
*/
function readExifData(string $file): object|null
{
$mimetype = Storage::mimeType($file);
if (!$mimetype) {
return null;
}
$type = get_file_type_from_mimetype(
Storage::mimeType($file)
);
@@ -772,7 +778,7 @@ if (! function_exists('readExifData')) {
try {
// Try to get the exif data
$data = Image::make($disk->path($file))->exif();
$data = Image::make(Storage::path($file))->exif();
// Encode data
$encodedData = mb_convert_encoding($data, 'UTF8', 'UTF8');