diff --git a/src/Parsers/HTMLInputs/File.php b/src/Parsers/HTMLInputs/File.php index c0e8964..31d65b1 100644 --- a/src/Parsers/HTMLInputs/File.php +++ b/src/Parsers/HTMLInputs/File.php @@ -2,11 +2,17 @@ namespace EasyPanel\Parsers\HTMLInputs; +use Illuminate\Support\Str; + class File { public function handle($name) { - return ""; + $string = '$'.$name; + return " + @if($string and !".'$errors'."->has('$name') and $string instanceof \Livewire\TemporaryUploadedFile and (in_array( ".$string."->guessExtension(), ['png', 'jpg', 'gif', 'jpeg']))) + temporaryUrl() }}\">temporaryUrl() }}\" alt=\"\"> + @endif"; } }