How to use SpatieMediaLibraryFileUpload outside of a resource (custom form)?

What exactly do I have to do, to get the SpatieMedia Field working on a custom form (outside of a resource)? I am building a custom form (inside a panel), which isn't a resource. The following code just works on the same model and the same field;
SpatieMediaLibraryFileUpload::make("top_logo")
->disk("media")
->image()
->collection("top_logo");
SpatieMediaLibraryFileUpload::make("top_logo")
->disk("media")
->image()
->collection("top_logo");
On a custom form, I see the field, I can upload something but after reload it is empty again. If I manually fill the relationship, the field is still empty.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server