File upload dojo.io.iframe.send文件上传在IE8中发送GET请求

File upload dojo.io.iframe.send文件上传在IE8中发送GET请求,file-upload,internet-explorer-8,dojo,xmlhttprequest,File Upload,Internet Explorer 8,Dojo,Xmlhttprequest,我正在使用dojo.io.iframe.send进行xhr文件上传,它在除IE8之外的所有浏览器中都能正常工作。IE8发送GET请求而不是多部分POST。这是我的代码: dojo.io.iframe.send({ form: this.logoForm.domNode, handleAs: "json", method: "POST", url: '/backend/design/uploadLogo

我正在使用dojo.io.iframe.send进行xhr文件上传,它在除IE8之外的所有浏览器中都能正常工作。IE8发送GET请求而不是多部分POST。这是我的代码:

dojo.io.iframe.send({
            form: this.logoForm.domNode,
            handleAs: "json",
            method: "POST",
            url: '/backend/design/uploadLogo',
            load: dojo.hitch(this, function(response) {
                if (response.error) {
                    errorFunc(response);
                } else {
                    this.submitStatusLogo.innerHTML = "Your logo has been successfully uploaded.";
                    this.logoButton.hideIndicator();
                    dojo.addClass(this.submitStatusLogo, "success");
                    if (response.logoPath) {
                        this.productLogo.innerHTML = '<img src="'+response.logoPath+'" alt="" />';
                    }
                }
            }),
            error: errorFunc
        });
dojo.io.iframe.send({
表单:this.logogorm.domNode,
handleAs:“json”,
方法:“张贴”,
url:“/backend/design/uploadLogo”,
加载:dojo.hitch(此,功能(响应){
if(response.error){
errorFunc(响应);
}否则{
this.submitStatusLogo.innerHTML=“您的徽标已成功上载。”;
this.logoButton.hideIndicator();
addClass(this.submitStatusLogo,“success”);
if(response.logoPath){
this.productLogo.innerHTML='';
}
}
}),
错误:errorFunc
});
而这个.logorm.domNode是:

<form dojoAttachPoint="logoForm" dojoType="dijit.form.Form" enctype="multipart/form-data" class="designLayoutForm">
    <div class="uploadedImage" dojoAttachPoint="productLogo"></div>
    <h2>Logo
        <span dojoType="sc2.common.TinyHelp" title="Logo">
            Upload a product logo that will be shown in the top left of the demo page.<br />
            If the logo is higher than 80 pixels, it will be resized to a height of 80px. <br />
            <br />
            <i>Supported file types are: png, jpg, gif, bmp.</i>
        </span>
    </h2>
    <p>
        <input type="hidden" dojoAttachPoint="logoForm_product" name="product" value="" />
        <input type="hidden" dojoAttachPoint="logoForm_XSessionVerify" name="X-Session-Verify" value="" />
        <input type="file" name="file" dojoAttachPoint="logoInput" />
    </p>
    <p dojoAttachPoint="submitStatusLogo" class="submitStatus"></p>
    <p>
        <input dojoType="sc2.form.IndicatorButton" dojoAttachPoint="logoButton" label="Upload">
    </p>
</form>

标志
上传将显示在演示页面左上角的产品徽标。
如果徽标高于80像素,则其大小将调整为80px的高度

支持的文件类型有:png、jpg、gif、bmp。


我做错了什么?

好的,我解决了这个问题,在表单元素中添加method=“POST”成功了。显然,在发送参数中指定方法:“POST”对于IE8来说是不够的。无论如何,感谢您抽出时间

好的,我解决了这个问题,在表单元素中添加method=“POST”成功了。显然,在发送参数中指定方法:“POST”对于IE8来说是不够的。无论如何,谢谢你抽出时间