I got the solution here, but it is for Magento 1. Please show me how can i achieve it in Magento 2.
Thanks.!
1 Answer 1
I had got the solution for that.
Please check below code that's working for me.
$fieldset->addField('images', 'image', array(
'name' => 'images[]',
'multiple' => true,
'label' => __('design Image'),
'title' => __('design Image'),
'required' => true
))->setAfterElementHtml('
<script>
require([
"jquery",
], function($){
$(document).ready(function () {
$( "#images" ).attr( "multiple", "true" );
});
});
</script>
');
answered Mar 24, 2017 at 7:08
Dharmendra Jadav
2,4351 gold badge19 silver badges34 bronze badges
-
can you please post the controller part of the code, how to upload the multiple files via $uploader = $this->_objectManager->create('Magento\MediaStorage\Model\File\UploaderFactory');Dev– Dev2017年10月27日 08:04:28 +00:00Commented Oct 27, 2017 at 8:04
-
1Did you get any solution for this I also want to upload the multiple images from frontendJack– Jack2018年02月16日 10:10:38 +00:00Commented Feb 16, 2018 at 10:10
Explore related questions
See similar questions with these tags.
default