F
Filament17mo ago
Vulture

How to disable Livewire Auto upload to temp folder ?

Hello, i want to make manual "Upload" button with livewire, but livewire model is starting direct upload after selecting files i try prevent but not work : wire:submit.prevent="submit" wire:model="pool_zip" Code :
<input id="file_input" wire:submit.prevent="submit" wire:model.defer="pool_zip" wire:model="pool_zip" name="file_input[]" type="file" class="custom-input-file" accept=".jpg,.png" multiple data-multiple-caption="{count} files selected">
<input id="file_input" wire:submit.prevent="submit" wire:model.defer="pool_zip" wire:model="pool_zip" name="file_input[]" type="file" class="custom-input-file" accept=".jpg,.png" multiple data-multiple-caption="{count} files selected">
1 Reply
Jyrki
Jyrki17mo ago
Depends on your livewire version, but for v3 wire:model should only upload on submit. If you use v2, add .defer on your model: https://laravel-livewire.com/docs/2.x/properties#deferred-updating
Livewire
Properties | Livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Want results from more Discord servers?
Add your server