How i use if condition with pluploadQueue

后端 未结 1 722
春和景丽
春和景丽 2021-01-28 06:37

i have this code

(\"#uploadContainer\").pluploadQueue({
  // General settings
  runtimes : \'gears,html5,flash,silverlight,browserplus\',
  url : \'{$upSet.handl         


        
相关标签:
1条回答
  • 2021-01-28 07:04

    You can't inside of the uploader's settings. You would need to do this outside:

    var min_img_resolution = 8000000; // default
    
    if (whatever) {
        // change default if condition is met
        min_img_resolution = 4000000;
    }
    
    ("#uploadContainer").pluploadQueue({
        runtimes : 'gears,html5,flash,silverlight,browserplus',
        url : '{$upSet.handler}',
        max_file_size : '{$upSet.maxFilesize}mb',
        chunk_size : '1mb',
        unique_names : false,
        prevent_duplicates: true,             
        filters : [
            { title : "Files", extensions : "{$upSet.allowedFileTypes}" }
        ],
        filters: {
            min_img_resolution: min_img_resolution // add variable here
        },
        flash_swf_url : '{$baseURL}/assets/plupload-2.1.2/js/Moxie.swf',              
        silverlight_xap_url : '{$baseURL}/assets/plupload-2.1.2/js/Moxie.xap'
    }); 
    
    0 讨论(0)
提交回复
热议问题