Welcome Guest, Not a member yet? Register   Sign In
Codeiginiter and PLupload
#4

[eluser]DavidBer[/eluser]
Continued.
upload.js
Code:
$(function() {
        $("#uploader").plupload({
                // General settings
                runtimes : 'gears,flash,html5',
                url : 'diva/process_upload',
                max_file_size : '1000mb',
                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 : "Document files", extensions : "doc,docx,txt,xls,ppt,pdf"},
                        {title : "Image files", extensions : "jpg,gif,png"},
                        {title : "Video files", extensions : "avi,wmv,qt"},
                        {title : "Audio files", extensions : "mp3,flac"},
                        {title : "Zip files", extensions : "zip"}
                ],

                // Flash settings
                flash_swf_url : 'assets/scripts/plupload.flash.swf',

        });

        // Client side form validation
        $('form').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)
                                                $('form').submit();
                                });

                                uploader.start();
                        } else
                                alert('You must at least upload one file.');

                        e.preventDefault();
                }
        });
});

views/diva

Code:
...
                        <div class="upload">
                        <p>Select some files to upload</p>
                        &lt;?php echo form_open('diva/process_upload'); ?&gt;
                        <div id = "uploader">You need Google Gears, Flash or HTML5</div>
                        &lt;?php form_close(); ?&gt;
                        </div>&lt;!-- end upload div --&gt;

The generated page has all the css/js files and I have clicked to make sure they are there and load.

Anyone have any ideas why I am not even getting the widget to show up? Granted, I have not slept in about 20 hours and am probably just missing something very easy, but I can't find it.

Thanks.


Messages In This Thread
Codeiginiter and PLupload - by El Forum - 11-03-2010, 07:04 AM
Codeiginiter and PLupload - by El Forum - 01-25-2011, 04:51 PM
Codeiginiter and PLupload - by El Forum - 02-24-2011, 01:36 AM
Codeiginiter and PLupload - by El Forum - 02-24-2011, 01:39 AM
Codeiginiter and PLupload - by El Forum - 01-24-2012, 04:26 PM
Codeiginiter and PLupload - by El Forum - 01-24-2012, 04:44 PM
Codeiginiter and PLupload - by El Forum - 01-25-2012, 12:43 AM
Codeiginiter and PLupload - by El Forum - 01-25-2012, 01:35 AM
Codeiginiter and PLupload - by El Forum - 01-26-2012, 11:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB