Yes but using Javascript in this case, you can't do it with Livewire, check this article, it's what you are looking for
Sep 11, 2022
4
Level 1
Livewire: Validate rule(s) before creating a temporary file upload
The Livewire.php file contains a set of rules temporary_file_upload. These rules are validated after the file has been stored to the temporary directory. Would it be possible when creating a simple upload input, to validate e.g. the mimetype before it automatically starts uploading the file to the temporary place?
Please or to participate in this conversation.