PHP code example of kevin021788 / yii2-jquery-fileupload-widget

1. Go to this page and download the library: Download kevin021788/yii2-jquery-fileupload-widget library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kevin021788 / yii2-jquery-fileupload-widget example snippets



use kevin021788\jqueryfileupload\JQueryFileUpload;


use kevin021788\jqueryfileupload\JQueryFileUpload;


use kevin021788\jqueryfileupload\JQueryFileUpload;

$js = <<< 'JS'
var uploadButton = $('<button/>')
    .addClass('btn btn-primary')
    .prop('disabled', true)
    .text('Processing...')
    .on('click', function (e) {
        e.preventDefault();
        var $this = $(this),
            data = $this.data();
        $this
            .off('click')
            .text('Abort')
            .on('click', function () {
                $this.remove();
                data.abort();
            });
        data.submit().always(function () {
            $this.remove();
        });
    }); 
JS;

$this->registerJs($js);



use kevin021788\jqueryfileupload\JQueryFileUpload;