From c60412dfbf698398ea9160e92180fdef9643bd03 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Sun, 19 Jan 2025 22:07:39 +1300 Subject: [PATCH] allow changing cropped image mime type the user can set the mime type as such --- src/View/Components/File.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/View/Components/File.php b/src/View/Components/File.php index 8935fd75..cacd294b 100644 --- a/src/View/Components/File.php +++ b/src/View/Components/File.php @@ -21,6 +21,7 @@ public function __construct( public ?string $cropCancelText = "Cancel", public ?string $cropSaveText = "Crop", public ?array $cropConfig = [], + public ?string $cropMimeType = "image/png", // Validations public ?string $errorField = null, public ?string $errorClass = 'text-red-500 label-text-alt p-1', @@ -125,7 +126,7 @@ public function render(): View|Closure|string (error) => { }, (event) => { this.progress = event.detail.progress } ) - }) + }, '{{ $cropMimeType }}') } }"