Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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">
share|improve this question
 
Are you getting any errors in the console? –  ekeren Dec 5 '13 at 11:10
 
yes if file size is greater than 1MB –  Shahzeb Dec 5 '13 at 11:12
 
only on firefox? –  ekeren Dec 5 '13 at 11:14
 
no in firefox and chrome both (it is file size validation which is working as expected). –  Shahzeb Dec 5 '13 at 11:16
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.