Thanks for the great UI components! We just bought a license and love the overall features.
One thing is not clear: how can I load already uploaded files in the form component? For example, in an edit form we need to load the already uploaded files, so they can be removed or new ones added to it.
I achieved this functionality with the x-media-library-collection component and the :model and collection attribute. However with the x-media-library-attachment component I cannot get it to work. I try to load the same array structure in the :media attribute, but it appears it cannot be set. The constructor does this:
$this->media = old($name) ?? [];
Should edits always be done with the x-media-library-collection? Thanks for your help!
Some improvement ideas for the docs:
Add info that you should add a 'preview' media conversion to see previews when you load from a model.
Thanks for the great UI components! We just bought a license and love the overall features.
One thing is not clear: how can I load already uploaded files in the form component? For example, in an edit form we need to load the already uploaded files, so they can be removed or new ones added to it.
I achieved this functionality with the
x-media-library-collection
component and the:model
andcollection
attribute. However with thex-media-library-attachment
component I cannot get it to work. I try to load the same array structure in the:media
attribute, but it appears it cannot be set. The constructor does this:$this->media = old($name) ?? [];
Should edits always be done with the x-media-library-collection? Thanks for your help!
Some improvement ideas for the docs: