File upload not working with 2+ files
I'm getting an issue with the spatie media library plugin. Only 2 photos are uploaded at a time though we've selected 2+.
My code is:
Note: This is in the EditRecord resource.
5 Replies
@Kuldeep please use proper `php with your 3 backticks before your code so we can read it better
why did you create a custom component for this?
A custom component is for the display purposes.
There can be many reasons for this, firstly try a localised driver first. Second, post max file size, max_input vars.
What are the errors when it fails with more than two.
I've checked with that process.
The issue is regarding the method: afterStateUpdated(). It'll run when the first image will be uploaded and after that rest of the image upload process will not work. So, need to use another method which perform save action after all images uploaded successful.
share your model media collection definition
also, if your custom field is just for display, you probably just need to set the view with
->view(...)
, and the afterStateUpdated
is not required