Closed romain-lgr closed 7 months ago
Related to #475, let's continue there.
@pascalbaljet How is this the same as #475 that issue was caused by the user not including an array into their file input both @romain-lgr and myself #556 are using an array as our file input and all the images are being sent to the backend (for me at least) The problem we are facing is that HandleSpladeFileUploads is not storing more than a single file.
Description:
When uploading multiple files using Filepond and Spatie media library, only the first file is saved - only when the model had no files already attached.
Steps To Reproduce Issue:
$isMultipleField
in the functionsyncMediaLibrary()
returnsfalse
,$keys
returns"images"
)If the model already had files attached, then it works as expected. (The variable
$isMultipleField
in the functionsyncMediaLibrary()
returnstrue
,$keys
returns"images.*"
)My input field code:
<x-splade-file :label="__('label.images')" name="images[]" multiple preview filepond />
My controller code:
HandleSpladeFileUploads::syncMediaLibrary($request, $product, 'images', 'images');