Can not save images with upload_multiple #982
Replies: 1 comment 2 replies
-
Hey @marctaule Sorry for the inconvenience. I tested it, and it's a bug. I've assigned my colleague @pxpm to fix the validation. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I have a problem with the 'upload_multiple' field when updating content.
I have the 'images' field among others, and it's an optional field.
If I don't have any image and I add one, it works correctly. But when I try to edit other fields, it always tells me: 'The images field must be a file of type: jpeg, png, jpg, gif, svg.'
I attach the code I have:
This is my rule:
public function rules() { return [ 'name' => 'required|string', 'images' => ValidUploadMultiple::field()->file('mimes:jpeg,png,jpg,gif,svg|max:2048'), ]; }
This is my code in CrudController:
CRUD::field([ 'name' => 'images', 'label' => 'Images', 'type' => 'upload_multiple', 'withFiles' => [ 'disk' => 'public', // the disk where file will be stored 'path' => 'images', // the path inside the disk where file will be stored ], 'wrapper' => [ 'class' => 'form-group col-md-6 mb-3' ] ]);
I try different type of field in my database: text, varchar and json and no one work :(
Can anyone help me?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions