I have the following script to upload profile image. When i click on the finish button, form is submitted. In chrome every thing is working but in Firefox it is not working. On server side i am getting the imagesize 0 and image name is null in form field.(does it mean no image is present?).
I am using Spring 3.2:
$('#image').fileupload({
singleFileUploads : true,
acceptFileTypes : /(\.|\/)(gif|jpe?g|png)$/i,
maxFileSize : 1000000,
}).on('fileuploadprocessalways', function (e, data) {
if (data.files[data.index].error) {
console.log(data.files[data.index].error);
}else{
$("#finish").click(function(){
data.submit();
});
}
});
Here is HTML:
<input type="file" name="image" class="filestyle" id="image" data-input="false" data-classButton="btn btn-primary btn-block">