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
the FileUpload is built upon Filepond js, so you may create a custom JS code to fire its cancel button
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?
You can inspect the cancel button in the dev tools and list all the event listeners on it
ok,I'll try. Thanlks!
Dude, No idea where's the event name for the cancel button... too much...
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.
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?
FilePond isn’t livewire. You’ll need to listen for it in js.
ok! thanks!