Spatie Media Library outside a Resource

I'm using this field on a Filament Form added to a Livewire component. I can't seem to find a way to provide the Model for where to attach the media. Did I miss it? In the docs, I understand there's something to be done. I follow the link and find nothing about relationships. Wrong link, or missing piece maybe? https://filamentphp.com/plugins/filament-spatie-media-library
Filament
Spatie Media Library by Filament - Filament
Filament support for Spatie's Laravel Media Library package.
No description
4 Replies
ConnorHowell
ConnorHowell6mo ago
Looks like the link is pointing to the v2 docs, the main thing would be setting up the model on your form component, updated docs for V3 are here: https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component#setting-a-form-model
Patricio
Patricio6mo ago
Oh, wow, exactly this! I didn't even notice I was on V2 docs Thanks! Will you make the PR to the docs? (or should I? and mention you)
ConnorHowell
ConnorHowell6mo ago
I'll do it now 😁
Patricio
Patricio6mo ago
It stored the image. After storing, the form field is ready to upload again. Shouldn't it be "filled" with the current image?