Jesusaddict avatar

Spring오류 : java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: Stream ended unexpectedly

jesusaddict

Published: 16 Jan 2018 › Updated: 16 Jan 2018Spring오류 : java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: Stream ended unexpectedly

Spring오류 : java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: Stream ended unexpectedly

익스플로러를 사용하다 보면 생기는 오류다.
크롬과 파이어폭스에서는 생기지 않았다.

인터넷을 찾아보면 파일용량이라던지, 파일 갯수 이런게 나오는데
좀 다른 경우를 찾았다.

FormData를 이용해서 ajax로 파일작업을 할때 생기는 에러다.
다음의 코드를 보면,

var formData = new FormData($("#폼ID")[0]);

$.ajax({
            url : "/저장할URL"
            ,type : "POST"
            ,data : formData
            ,dataType : "json"
            ,processData : false
            ,contentType : false
            ,async: false
});

일반적인, Form을 그대로 ajax로 넘기는 코드인데 이 코드가 IE에서는 Stream ended unexpectedly 에러가 난다.
그래서 아래 코드를 추가했더니 오류가 나지 않는다.

formData.append("폼요소",  "폼값");

-- fin.

Leave Spring오류 : java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: Stream ended unexpectedly to:

Written by

신규 ICO 소개 / 일상사진 / 맛스팀 / 육아 / 운동과다이어트

Read more #streamendedunexpectedly posts


Best Posts From Jesusaddict

We have not curated any of jesusaddict's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Jesusaddict