如何覆盖jquery文件上传插件选项
我正在使用jquery文件上传插件和jquery UI 我想覆盖小部件选项,如如何覆盖jquery文件上传插件选项,jquery,file-upload,Jquery,File Upload,我正在使用jquery文件上传插件和jquery UI 我想覆盖小部件选项,如maxUploadfilesize 如果我跳过主文件jquery.fileupload ui.js中的设置,则为当前设置 那就行了 var parentWidget = ($.blueimpFP || $.blueimp).fileupload; $.widget('blueimpUI.fileupload', parentWidget, { options: { /
maxUploadfilesize
如果我跳过主文件jquery.fileupload ui.js中的设置,则为当前设置
那就行了
var parentWidget = ($.blueimpFP || $.blueimp).fileupload;
$.widget('blueimpUI.fileupload', parentWidget, {
options: {
// By default, files added to the widget are uploaded as soon
// as the user clicks on the start buttons. To enable automatic
// uploads, set the following option to true:
autoUpload: true,
//sequentialUploads, true,
// The following option limits the number of files that are
// allowed to be uploaded using this widget:
maxNumberOfFiles: undefined,
// The maximum allowed file size:
maxFileSize: 20000000,
// The minimum allowed file size:
minFileSize: undefined,
有没有什么方法可以在我的html模板中覆盖它,以便对不同的html页面进行不同的自定义
我指的是一些我可以放在模板中覆盖默认设置的JAVscript代码,它们说您可以覆盖它们
把这段代码放在初始化插件的地方
$('#fileupload').fileupload(
'option',
{
maxFileSize: 4000000,
sequentialUploads: true
}
);