Using Jquery to change maxfile in weixiyen file dr

2019-08-14 14:45发布

I'm using weixiyen file drop plugin https://github.com/weixiyen/jquery-filedrop/blob/master/jquery.filedrop.js . It allows me to set how many files can be dropped at a time for upload.

$('#dropzone').filedrop({
   url: 'upload.php',              
   paramname: 'userfile',

   maxfiles: 25,
   maxfilesize: 20, 

   // code part below// 

   });

This way i can only change the maxfile limit by changing the code here. Can i change the value 25 using Jquery

like

var filelimit=$('#filelimit').val();

   $('#dropzone').filedrop({
   url: 'upload.php',              
   paramname: 'userfile',

   maxfiles: filelimit, //changed here
   maxfilesize: 20, 

   // code part below// 

   });

It is not working. Is it possible to do this somehow ?

0条回答
登录 后发表回答