Repeater Item Loss in Filament Resource with SpatieMediaLibraryFileUpload

What I am trying to do: I'm attempting to implement a repeater in my Filament resource that allows adding multiple construction progress images with associated metadata. Each item should be saved to the disk and have an entry in the Spatie media library table. What I did: Set up a Repeater field in my DevelopmentResource with SpatieMediaLibraryFileUpload and other form components. Implemented mutateFormDataBeforeFill method in the EditDevelopment page to populate the repeater with existing data. Configured the Development model with InteractsWithMedia trait and necessary media collections. My issue/the error: When I add the first repeater item, it works correctly - the image is saved to disk and an entry is created in the Spatie media library table. However, after saving and trying to add a new item, the old (first) item is lost from the database, and only the new added item remains. It seems that there's always only one item persisting. Can anyone offer any advice as I've been dealing with it for a while now.
No description
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server