F
Filament2w ago
Juan

Form FileUpload cancel hook

Hey there! I would like to know if it is possible to "hook" an action to a FileUpload for the cancel button... something like ->onCancelPressed... Thanks!
8 Replies
Mohamed Ayaou
Mohamed Ayaou2w ago
the FileUpload is built upon Filepond js, so you may create a custom JS code to fire its cancel button
Juan
JuanOP2w ago
Thanks! Do you know the name of the event that the cancel button fires, I've tried looking it up but I am not able to find it?
Mohamed Ayaou
Mohamed Ayaou2w ago
You can inspect the cancel button in the dev tools and list all the event listeners on it
Juan
JuanOP2w ago
ok,I'll try. Thanlks! Dude, No idea where's the event name for the cancel button... too much...
awcodes
awcodes2w ago
Easy File Uploading With JavaScript | FilePond
A JavaScript library that can upload anything you throw at it, optimizes images for faster uploads, and offers a great, accessible, silky smooth user experience.
Juan
JuanOP7d ago
Ok! Thanks!! I'm lost. I registered the event with FileUpload->registerListeners and the event "FilePond:processfileabort" but the code (just a dump) doesn't get executed... Maybe I'm missing something?
awcodes
awcodes7d ago
FilePond isn’t livewire. You’ll need to listen for it in js.
Juan
JuanOP4d ago
ok! thanks!

Did you find this page helpful?