Magento – Magento 2 – How to upload multiple images in admin panel grid form

magento2multiple-file-uploadupload

I got the solution here, but it is for Magento 1.
Please show me how can i achieve it in Magento 2.

Thanks.!

Best Answer

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>
    ');
Related Topic