Topic: How to limit the queue to only 1 file ?

I want to limit the queue to only one file

How can i do that ?

Re: How to limit the queue to only 1 file ?

only use the html4 runtime.

3 (edited by LeandroJF 2012-02-24 19:07:44)

Re: How to limit the queue to only 1 file ?

or see this post http://www.plupload.com/punbb/viewtopic.php?id=695 for every runtime

Re: How to limit the queue to only 1 file ?

Cant i just simply clear the queue ? I need only to upload file once per one

Re: How to limit the queue to only 1 file ?

you can use the "splice" method to remove files from the list

http://www.plupload.com/plupload/docs/a … tml-splice

6 (edited by loicbcn 2012-09-06 12:15:18)

Re: How to limit the queue to only 1 file ?

Hello,

in the source code line 903, is this default setting:

multi_selection : true.

If you turn it to false, you'll only can select 1 file at time.

var uploader = new plupload.Uploader({
    runtimes : 'html5,flash',
    browse_button : 'pickfiles',
    container: 'container',
    max_file_size : '1mb',
    url : url_prefix + namespace + '/upload/',
    resize : {width : 1000, height : 1000, quality : 90},
    flash_swf_url : url_prefix + 'js/plupload_1_5_4/plupload.flash.swf',
    filters : [
        {title : "Image files", extensions : "jpg,gif,png"}
    ],
    unique_names : true,
    multi_selection:false
});

Re: How to limit the queue to only 1 file ?

yes, but this wont limit the number of files on the queue, you can select multiples files one by one

8 (edited by loicbcn 2012-09-06 15:04:02)

Re: How to limit the queue to only 1 file ?

Yes but after select one file, you can do disappear the pickbutton and appear when delete the file from the queue etc ...
Isn't it ?

Re: How to limit the queue to only 1 file ?

yes, agree, this is another form of do that. But I think is more friendly to show an alert informing the user.

Re: How to limit the queue to only 1 file ?

Hi Leandro.

What about the setting max_file_count: 1  ???

Will it work to limit max number of files in the queue??

I did set 1, 2, 3 and other and it didn´t work. See bellow:


    // Setup html5 version
    $("#html5_uploader").pluploadQueue({
        // General settings
        runtimes : 'html5',
        url : '../upload.php',
        max_file_size : '10mb',
        max_file_count: 3, // user can add no more then 20 files at a time
        chunk_size : '1mb',
        unique_names : 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 : 100}
    });

Thanks..

Re: How to limit the queue to only 1 file ?

there is no "max_file_count" setting. read this topic:

http://www.plupload.com/punbb/viewtopic.php?id=695