manualuploader.fineUploader('setParams', {
foo: bar
});
var manualuploader = $('#manual-fine-uploader').fineUploader({
.
.
.
})
.on('submit', function(event, id, name) {
.
.
}).on('complete', function(event, id, fileName, responseJSON) {
// HOW CAN I ACCESS TO foo -parameter HERE?
}
});
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The responseJSON
parameter will include any and all keys and values returned in your server's response to the upload request. The setParams
function is used to send parameters in the upload request to your server. If, for some reason, you want to make these same values available to your complete
callback, simply include them in your server's response.