ACC SHELL

Path : /srv/www/vhosts/centrumlb/administrace/include/
File Upload :
Current File : /srv/www/vhosts/centrumlb/administrace/include/plupload_dokumenty.inc

<script type="text/javascript">
    // Convert divs to queue widgets when the DOM is ready
    $(function() {
        $("#uploader").pluploadQueue({
            // General settings
            runtimes : 'gears,silverlight,browserplus,html5,flash,',
            url : 'plupload/examples/upload.php',
            max_file_size : '10mb',
            chunk_size : '1mb',
            unique_names : true,

            // Resize images on clientside if we can
            //resize : {width : 320, height : 240, quality : 90},

            // Specify what files to browse for
            filters : [
                {title : "Soubory dokumentů", extensions : "pdf,xls,doc"},
		{title : "Obrázky", extensions : "jpg"},
                {title : "Zip soubory", extensions : "zip"},
                {title : "MP3 soubory", extensions : "mp3"}
            ],

            // Flash settings
            flash_swf_url : 'plupload/js/plupload.flash.swf',

            // Silverlight settings
            silverlight_xap_url : 'plupload/js/plupload.silverlight.xap'
        });

        // Client side form validation
        $('#upload').submit(function(e) {
            var uploader = $('#uploader').pluploadQueue();

            // Validate number of uploaded files
            if (uploader.total.uploaded == 0) {
                // Files in queue upload them first
                if (uploader.files.length > 0) {
                    // When all files are uploaded submit form
                    uploader.bind('UploadProgress', function() {
                        if (uploader.total.uploaded == uploader.files.length)
                            $('#upload').submit();
                    });

                    uploader.start();
                } else
                    //alert('Před odesláním vyberte soubor.');

                e.preventDefault();
            }
        });
    });
</script>

ACC SHELL 2018