本文介绍了Fineuploader花费的时间太长,无法在IE9中上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用fineuploader 3.3.0版本.
我正遇到fineuploader in IE9的问题.因为优良的上传器不支持ie9中的sizeLimit.
我正在通过简单的contentlength检查是否在服务器端检查文件大小,是否为(this.Request.Files[0].ContentLength > 5242880).

Hi I am using fineuploader 3.3.0 version.
I am facing problem with fineuploader in IE9. as fine uploader does not support sizeLimit in ie9.
I am checking the file size at server side with simple contentlength check if (this.Request.Files[0].ContentLength > 5242880).

,但此回复花了1-2分钟.同样,1.4 MB file花费的时间太长.

but it took 1-2 mins to get this response. Also the 1.4 MB file is taking too long to upload.

请让我知道是什么原因造成的,以下是我正在使用的fineuploader代码:-

Can some one please let me know what is causing it, following is the fineuploader code I am using:-

 $('#restricted-fine-uploader').fineUploader({
        request: {
            endpoint: '/apm/api/job/UploadDocument/?category=' + JobDocuments.category + '&mode=' + JobDocuments.forceupload + '&jobid=' + job_manager_details.jobId
        },
        autoUpload: true,
        text: {
            uploadButton: 'Upload File'
        },
        multiple: false,
        validation: {
            allowedExtensions: ['doc', 'docx', 'xls', 'xlsx', 'pdf'],
            sizeLimit: 5242880,
            itemLimit: 1
        },
        showMessage: function (message) {
            // Using Twitter Bootstrap's classes and jQuery selector and method
            $('#restricted-fine-uploader').append('<div class="alert alert-error">' + message + '</div>');
        }
    }).bind('submit', function (event, id, fileName) {
        $('#displaymessage').hide();
        $('li. qq-upload-fail').hide();
        job_manager_details.isuploading = 1;
        //            fileCount++;

    }).bind('complete', function (event, id, fileName, responseJSON) {
        $('li. qq-upload-fail').hide();
        $('#displaymessage').hide();
        job_manager_details.isuploading = 0;
        if (responseJSON.success) {
            //                fileCount--;
            ShowJobDocuments();
            //                if (fileCount == 0 && !$('div.alert-error').html()) {
           $('#jobDocumentDialog').dialog("close");
            //                }
        }
    })

推荐答案

我只是遇到了同样的问题,并且发现了另外一条线索.

I just had the same issue and found one more clue.

当网络进行NAT转换时,VM的运行速度非常慢(WinXP/IE8),但是一旦切换到桥接状态,它就会变得非常快.

The VM is incredibly slow (WinXP/IE8) while the network was a NAT'd but it became very fast as soon as it was switched to being bridged.

这篇关于Fineuploader花费的时间太长,无法在IE9中上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 16:37