ru, я использовал свой собственный способ решить эту проблему, я не знаю, что это хорошо. Я надеюсь на лучшие идеи.
добавить опции pfiles к blueimp.fileupload, как в jquery.fileupload.js:
$ .widget ('blueimp.fileupload', {
options: {
// The drop target element(s), by the default the complete document.
// Set to null to disable drag & drop support:
dropZone: $(document),
pfiles:null, // this is for marking the selected files
// The paste target element(s), by the default the complete document.
// Set to null to disable paste support:
pasteZone: $(document)
...
}}
in _onAdd function add like:
_onAdd: function (e, data) {...
that.pfiles=new Array(); // files array
$.each(fileSet || data.files, function (index, element) {
...
};
that.pfiles.push(newData); // add to array
return (result = that._trigger('add', e, newData));
});
return result;
}
, когда использовать его как:
$ (функция ($) { 'использовать строгий';
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
_onChange : function(e) {
this._cancelHandler();
this._super(e);
},
_initEventHandlers : function() {
this._super();
this._on($('#cancel-button'), {
click : this.cancel
});
},
cancel : function(e) {
$('#file-upload-info-list').hide();
$('#upload-file-preview').html('');
this._cancelHandler();
},
// here the pfiles is used...
_cancelHandler : function(e) {
if(this.pfiles != null) {
$.each(this.pfiles, function(index, element) {
element.submit = null;
});
this.pfiles = null;
}
}
});
});
это мой путь.