0
我想允許用戶只在一些頁面上上傳1個文件,在其他頁面上上傳1個以上的文件。 有很地方改變這個數字自定義jQuery文件上傳的maxNumberOfFiles
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: false,
// The following option limits the number of files that are
// allowed to be uploaded using this widget:
maxNumberOfFiles: undefined,
但是,如果我在這裏改變它,它將適用於網站上所有的jQuery上傳文件的控制。我如何定製選項maxNumberOfFiles來達到我的目的。