WEB

네이버 스마트에디터(smarteditor2) 파일 업로드 0바이트 오류

ndlessrain 2019. 9. 30. 19:28
728x90

파일 업로드 시 어떤 파일은 서버에 정상 업로드되고,

어떤 파일은 0바이트로 업로드되서 읽지를 못하는 상황.

character decoding failed. 로 나오면서 특수문자가 들어가게 되어 발생하는 오류로 추정.

해결은 전송 시 contentType에 "multipart/form-data"로 변경하니 됨.

I think the problem caused by Content-Type, by default jquery use application/x-www-form-urlencoded; charset=UTF-8. Try to set it up to text/plain or multipart/form-data. Here is documentation.

 

728x90