2

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

3

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>
    ');
2
  • 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
    Oct 27, 2017 at 8:04
  • 1
    Did you get any solution for this I also want to upload the multiple images from frontend
    – Jack
    Feb 16, 2018 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.