Uploading images in repeatable without base64 #848
-
Hi, I am trying to include the images in the edit form like this:
When I click the save button I get an SQL error because it tries to write a base64 image to the database ( This works fine when the image is inside a regular form, but I cannot get it to work when the image is in a repeater. What am I missing? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @klaaskox I just tested and achieved what you are trying: CRUD::field([
'name' => 'images',
'type' => 'repeatable',
'subfields' => [
[
'name' => 'alt_text',
'wrapper' => ['class' => 'form-group col-md-6'],
],
[
'name' => 'image',
'type' => 'image',
'height' => '300px',
'width' => '300px',
'crop' => 'true',
'wrapper' => ['class' => 'form-group col-md-6'],
'withFiles' => [
'disk' => 'public', // the disk where file will be stored
'path' => 'slides', // the path inside the disk where file will be stored
]
],
],
]); Notice: The |
Beta Was this translation helpful? Give feedback.
Hey @klaaskox
I just tested and achieved what you are trying: