Spatie Media File Upload Issue

Hello, Does anyone know how to "insert" image into form. I have this action witch is getting view from Livewire component. And livewire component itself has forms which contain Spatie Media Library. Now the issue is i cannot get that fileupload to attach and preview image.. Any solution?
No description
No description
4 Replies
awcodes
awcodes3mo ago
What is the context? Is it durning create or after create? You should just be able to pass record to the form and then the make() would just work for the product image. Passing record to the the media field seems off to me.
SuperUserDo
SuperUserDo3mo ago
After create, it is in table Action within infolist(), that infolist takes Livewire component which is providing SpatieMediaFileUpload
SuperUserDo
SuperUserDo3mo ago
No description
awcodes
awcodes3mo ago
I’d recommend going through these docs a step at a time. And also look at the code for EditRecord to see how it’s being done there. https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component#adding-the-form
Want results from more Discord servers?
Add your server