Disable "Create" until receiving a webhook?

Hi, I'm using a third-party video uploader (Mux.com). When the upload is complete and processed by them, they send a webhook that I receive and process. In my filament resource, I want to disable creation until i receive the webhook payload and process it. Right now, when the upload is complete, I ask the users to wait for 5-10 seconds before trying to create. When the webhook is not received yet, i show an error notification telling them to wait or that something went wrong with the event, but that's not a good UX. Is it possible for filament to conditionally allow creation based on a webhook event?
No description
3 Replies
awcodes
awcodes3w ago
Honestly, it sounds like you need a custom upload field for this since it kinda goes out side the scope of laravel’s filesystem driver.
Dhru
Dhru2w ago
If I read this correctly can’t you just have a hidden field that you set as 1 upon webhook completion and set a validation rule that requires that field to be 1 . Default it to 0. Or something along those lines. You will have to write some code to update the status of the webhook live to your form.
toeknee
toeknee2w ago
Actually tbh... it sounds like you need the validation rule as Dhru says 🙂

Did you find this page helpful?