<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/** @var $block \Magento\Backend\Block\Media\Uploader */
?>

<div id="<?php echo $block->getHtmlId() ?>" class="uploader"
    data-mage-init='{
        "Magento_Backend/js/media-uploader" : {
            "maxFileSize": <?php /* @escapeNotVerified */ echo $block->getFileSizeService()->getMaxFileSize() ?>,
            "maxWidth":<?php /* @escapeNotVerified */ echo \Magento\Framework\File\Uploader::MAX_IMAGE_WIDTH ?> ,
            "maxHeight": <?php /* @escapeNotVerified */ echo \Magento\Framework\File\Uploader::MAX_IMAGE_HEIGHT ?>
        }
    }'
>
    <div class="fileinput-button form-buttons button">
        <span><?php /* @escapeNotVerified */ echo __('Browse Files...') ?></span>
        <input id="fileupload" type="file" name="<?php /* @escapeNotVerified */ echo $block->getConfig()->getFileField() ?>"
            data-url="<?php /* @escapeNotVerified */ echo $block->getConfig()->getUrl() ?>" multiple="multiple" />
    </div>
    <div class="clear"></div>
    <script id="<?php echo $block->getHtmlId() ?>-template" type="text/x-magento-template" data-template="uploader">
        <div id="<%- data.id %>" class="file-row">
            <span class="file-info"><%- data.name %> (<%- data.size %>)</span>
            <div class="progressbar-container">
                <div class="progressbar upload-progress" style="width: 0%;"></div>
            </div>
            <div class="clear"></div>
        </div>
    </script>
</div>

