public function display() {
        $source = str_replace(['{VENDOR}', '{APP_ROOT}'], [LIBS_FOLDER, APP_ROOT], $this->jsSource);
        $url = AssetsPublisher::get()->publishFolder($source);
        $events = $this->getJSEvents();
        $r = Form::get()->input($this->name . '[]', 'file', null, [
                'id' => $this->id,
                'data-url' => $this->dataUrl,
                'multiple' => 'multiple',
            ])
            . Html::get()->scriptFile($url . "js/vendor/jquery.ui.widget.js")
            . Html::get()->scriptFile($url . "js/jquery.iframe-transport.js")
            . Html::get()->scriptFile($url . "js/jquery.fileupload.js")
            . Html::get()->script("\$(function () {
    \$('#{$this->id}').fileupload({
        dataType: 'json' " . (isset($this->jsEventsHandlers['fileuploaddone'])?'': ",
        done: function (e, data) {
            $.each(data.result.files, function (index, file) {
                $('<p/>').text(file.name).appendTo($(\"#{$this->resultsId}\"));
            });
        }") . "
    })$events;
});");
        if ($this->generateResultsDiv) {
            $r .= Html::get()->tag("div", "", ["id" => $this->resultsId]);
        }
        return $r;
    }