1 (edited by fishywishy 2010-05-18 15:02:06)

Topic: 'custom example' -> auto start upload

I'm trying to edit the custom example to upload a file once it has been selected. (will not need to cater for multiple files),

i thought this would work but it doesn't...

uploader.bind('FilesAdded', function(up, files) {
    uploader.start();
});

ps. fantastic plugin by the way!

Re: 'custom example' -> auto start upload

Make sure you bind it after the init since it binds default handlers.

Re: 'custom example' -> auto start upload

thank you kindly

4 (edited by JGutzeit 2010-12-07 13:16:00)

Re: 'custom example' -> auto start upload

using uploader.start() breaks multiple_queue on html5 runtime. The
[div id="$ID$_html5_container" ... class="plupload html5"] will not get respositioned correctly, it stays at position, width and height 0.

Is there a workaround for this?

Edit: had a closer look now: html4 and silverlight breaks, too.

Re: 'custom example' -> auto start upload

Are you talking about specific usage case, like loading Plupload in UI Dialog? Can't repeat that issue here.

If you want to see your issue fixed, do not report it here, do it on - GitHub.

6 (edited by JGutzeit 2010-12-08 15:11:24)

Re: 'custom example' -> auto start upload

davit wrote:

Are you talking about specific usage case, like loading Plupload in UI Dialog? Can't repeat that issue here.

I first observed this problem in a UI-dialog, but I verified the problem by adding this event handler in the example queue_widget.html, too.

// Setup html5 version
    $("#html5_uploader").pluploadQueue({
        // General settings
        runtimes : 'html5',
        url : 'upload.php',
        max_file_size : '10mb',
        chunk_size : '1mb',
        unique_names : true,
        multiple_queues : true,
        filters : [
            {title : "Image files", extensions : "jpg,gif,png"},
            {title : "Zip files", extensions : "zip"}
        ],

        // Resize images on clientside if we can
        resize : {width : 320, height : 240, quality : 90}
    });
    
    var uploader_html5 = $("#html5_uploader").pluploadQueue();
    uploader_html5.bind('FilesAdded', function(up, files) {
        uploader_html5.start();
    });

before first upload:

<div id="p15j355com1mjn1i5vph719fa1ftu3_html5_container" style="position: absolute; background: none repeat scroll 0% 0% transparent; width: 75px; height: 20px; overflow: hidden; z-index: 99999; opacity: 0; top: 292px; left: 16px;" class="plupload html5">
     <input type="file" multiple="multiple" accept="image/jpeg,image/gif,image/png,application/zip" style="width: 100%;" id="p15j355com1mjn1i5vph719fa1ftu3_html5">
</div>

after the first upload:

<div id="p15j355com1mjn1i5vph719fa1ftu3_html5_container" style="position: absolute; background: none repeat scroll 0% 0% transparent; width: 0px; height: 0px; overflow: hidden; z-index: 99999; opacity: 0; top: 0px; left: 0px;" class="plupload html5">
     <input type="file" multiple="multiple" accept="image/jpeg,image/gif,image/png,application/zip" style="width: 100%;" id="p15j355com1mjn1i5vph719fa1ftu3_html5">
</div>

height, top, left are all 0, now.

Re: 'custom example' -> auto start upload

Right... I see it now too. I was looking into UI widget before. I will get that fixed in next commit.

If you want to see your issue fixed, do not report it here, do it on - GitHub.

Re: 'custom example' -> auto start upload

Nice one mate.