2
dojo.io.iframe.send를 사용하여 xhr 파일 업로드를 수행 중이며 IE 8을 제외한 모든 브라우저에서 정상적으로 작동합니다. IE8은 대신 GET 요청을 보냅니다. 멀티 파트 POST의 이건 내 코드입니다 :dojo.io.iframe.send 파일 업로드가 IE8에서 GET 요청을 전송합니다.
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
});
그리고 this.logoForm.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>
?
좋아요. 메소드를 추가하면 "POST"가 트릭을했습니다. 분명히 메서드를 지정 : 보내기 매개 변수에서 "POST"IE8 충분하지 않았습니다. 어쨌든 시간 내 주셔서 감사합니다. – Parzifal