0

I'm using fineuploader to upload large video files to my server. It works perfectly on all browsers except for IE8 - IE9. The files start to upload but then continue to upload pretty much "forever" and do not complete.

It works on IE for smaller files (limited by max PHP post size). Is there a way to stop this or give some kind of error message for IE8-9 users?

I was thinking of setting the max post file size to something huge... but unsure if this has any performance issues for the server?

Any help greatly appreciated. My code so far below:

<script src="fineuploader/jquery.fineuploader-3.7.0.js"></script>
<script>
    var fileCount = 0;
    var addedFiles = 0;
    var fileLimit = 1;

    $(document).ready(function() {
        //Hide Submit button until video has finished uploading
        $('#submit').hide();
        $('#uploadmessage').hide();
        var filelimituploader = new qq.FineUploader({
            element: $('#filelimit-fine-uploader')[0],
            request: {
                endpoint: 'processfile/example.php'
            },
            retry: {
                enableAuto: true
            },
            chunking: {
                enabled: true
            },
            resume: {
                enabled: true
            },
            validation: {
                allowedExtensions: ['png','jpg','jpeg','gif','mp4','avi','mov','mpg','flv','m4v'],
                sizeLimit: 199229440
            },
            callbacks: {
                onSubmit: function(id, fileName) {
                    $('#uploadmessage').show();

                    fileCount ++;
                    if(fileCount > fileLimit) {
                        $('#filelimit-fine-uploader .qq-upload-button').hide();
                        $('#filelimit-fine-uploader .qq-upload-drop-area').hide();
                        return false;
                    }
                },
                onCancel: function(id, fileName) {
                    $('#uploadmessage').hide();
                    fileCount --;
                    if(fileCount <= fileLimit) {
                        $('#filelimit-fine-uploader .qq-upload-button').show();
                    }
                },
                onComplete: function(id, fileName, responseJSON) {
                    if (responseJSON.success) {
                        addedFiles ++;
                        if(addedFiles >= fileLimit) {
                            $('#filelimit-fine-uploader .qq-upload-button').hide();
                            $('#filelimit-fine-uploader .qq-upload-drop-area').hide();
                            //$('#filenamehere').html(responseJSON.uploadName);
                            $('#filen').val(responseJSON.uploadName);
                            $('#submit').show();
                            $('#uploadmessage').hide();
                        }
                    }
                }
            }
        });
    });
</script>
Ray Nicholus
  • 19,538
  • 14
  • 59
  • 82
Ralph Vugts
  • 425
  • 5
  • 14
  • Is this a server-side problem? See: http://stackoverflow.com/questions/2184513/php-change-the-maximum-upload-file-size If setting the max upload size via PHP is not the solution, then verify your server is working properly. Maybe throw some debug statements in there to ensure that it is properly handling the upload. Also, check out this solution as well: http://stackoverflow.com/questions/15963329/fineuploader-taking-too-long-to-upload-files-in-ie9?rq=1 – Mark Feltner Jul 22 '13 at 14:10
  • If I increase the max upload size via PHP it does work... but this is not ideal as could still run into this issue if someone uploads a really big file that exceeds that. – Ralph Vugts Jul 23 '13 at 06:15
  • The real issue here is that IE9 browsers (and older) cannot detect file size. So you won't be able to tell if they have exceeded that limit until the file gets your server. You could have your server respond with a response like: `{ "success" : false, "error": "File size too big!" }` when the file is too big and have FU display an alert via the right callback. If you are in FineUploader mode (not basic) then FineUploader will display that alert for you. – Mark Feltner Jul 23 '13 at 18:23

1 Answers1

0

Set the max upload size value server side to a very large number, if you are concerned about this. You can utilize the file chunking feature provided by Fine Uploader and set the chunk size to a specific number, say, "10000000" (10 MB). This will ensure all requests do not exceed 10 MB (plus some overhead if the requests are multipart encoded). Note that chunking is not possible in IE9 or older though, but this will work in all other browsers.

Ray Nicholus
  • 19,538
  • 14
  • 59
  • 82