I am using bootstrap-fileinput, I am able to upload the file successfully, But I also want to send some data like user details with file to the server. is there any option to add data?
My JavaScript Code:
$('#xlf').fileinput({
showPreview: false,
uploadUrl: 'MuUrl',
allowedFileExtensions: ['csv'],
browseClass: "btn btn-info",
elErrorContainer: '#errorBlock',
msgUploadEnd: "File Uploded Successfully",
maxFileSize: 92160
});
Uploading additional data to the server is done with the
uploadExtraData. This only works for asynchronous uploads. If you're uploading with form submission just add the additional data in hidden fields in your form to send to your server.Ajax submission
Here is the Asynch option.
Hope that will help someone, even though the answer is soo super-late.