问题
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.
来源:https://stackoverflow.com/questions/15991042/how-to-access-fineuploader-parameters-oncomplete-function