2

我在使用 blueimp 文件上传时遇到问题。

当我尝试在 FireFox 或 Google Chrome 中上传文件时,我会在 .NET 端获取带有长度和文件名的文件。

在此处输入图像描述

如果我在 IE 中尝试它,我会得到一个没有内容长度和文件名的空流。我确定我的文件数组是正确的,因为它可以在 FF 和 Chrome 中使用长度和文件名。

在此处输入图像描述

谁能给我正确的提示?

这是我的设置的样子:

$('.fileupload').each(function () {
        var that = $(this);
        $(this).fileupload({
            dropZone: $('#' + content).find('.fileupload').length > 1 ? $('#' + content + ' .container' + that.closest('.standardJoins').find('.tStampJoin').val()) : $(document),
            pasteZone: $('#' + content).find('.fileupload').length > 1 ? $('#' + content + ' .container' + that.closest('.standardJoins').find('.tStampJoin').val()) : $(document),
            singleFileUploads: false,
            url: '/service/serviceAIO.aspx',
            multipart: false,
            change: function (e, data) {
                $.each(data.files, function (index, file) {
                    fileArray[fileArray.length] = data.files[0];
                });
            }
...

由于某些原因,在按下按钮之前我无法提交表单。按下按钮后,我以这种方式提交表单:

$('#' + content + ' .fileupload:visible:first').fileupload('send', { files: fileArray });

我有多个文件上传器实例,因为它是具有多个选项卡(jQuery UI)的单页面布局。

在服务器端,我收到以下请求:

Request.Files("files[]")

在此先感谢,丹尼尔

4

0 回答 0