Feb 13, 2024
0
Level 1
Delay for wire:loading during file upload?
I would like to display a message while a file is being uploaded. I already have the following:
<label for="file-input" class="btn bg-gradient-primary btn-sm mb-0 me-2"> Edit
<input type="file" wire:model="upload" wire:loading.attr="disabled" wire:target="upload" id="file-input" class="d-none">
<div wire:loading wire:target="upload"> Uploading... </div>
</label>
Unfortunately, there is always quite a long delay between the time the file is selected and the display of "Uploading..." - then the message is only displayed very shortly.
How can I display the message immediately?
Please or to participate in this conversation.