Spatie Media Library in Builder

I've added SpatieMediaLibraryFileUpload as a content block to a Builder field, and while the upload is successfully completed (it's inserted into the media database), there is nothing being stored in the blocks json. Meaning, the block is inserted, but there's nothing in data. How do you implement the uploader properly to get at least a reference to the media records (in order to be able to print them to screen)? Is that even possible?
2 Replies
Patrick Boivin
Patrick Boivin15mo ago
I'm not sure this is possible. I think the Spatie Media fields are designed to attach to a relationship on the parent record. Maybe if the Builder blocks were backed by a Block model instead of stored as JSON. Something to explore...
GavTheDev
GavTheDevOP15mo ago
Would be nice indeed to have media library images in the builder. I thought I had seen it in v2 but maybe that was something different. I think Repeater? If I'm correct that stored the media ID in data 🤔
Want results from more Discord servers?
Add your server