From 5e9e4142d05db89d784eb2756476b4c56bd7ee14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=8Carodej?= Date: Mon, 25 Apr 2022 20:10:41 +0200 Subject: [PATCH] mimetype hotfix --- src/Support/helpers.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Support/helpers.php b/src/Support/helpers.php index d8550252..7ec6e7f8 100644 --- a/src/Support/helpers.php +++ b/src/Support/helpers.php @@ -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');