I am using http://fineuploader.com/ to upload a file. Works perfect. I then set params
in the request
object to send some additional parameters to be sent to the server. Works perfect. I then add another parameter to send using setParams
with the onSubmit callback. Doesn't work perfect as it deletes my original parameters. My desire is to add this last parameter to the original parameters, not replace them. My newPar is a dynamic valve, and not a constant as shown in my example.
Should I just not attempt to define parameters in the request
object and do it all in the callback?
Or set my added parameters in the request
object using an anonymous function?
Or maybe some other way?
var uploader = new qq.FineUploaderBasic({
button: document.getElementById('uploader'),
autoUpload: false,
multiple:false,
request: {
endpoint: 'uploads/handleUploads.php',
params: {id:123,task:'upload'}
},
callbacks: {
onSubmit: function(id, fileName) {
this.setParams({newPar:321});
}
},
debug: true
});