-
[Tomcat] 파일업로드 용량 제한 해제Web | Tomcat/Server Settings 2022. 5. 26. 18:51
ajax POST 파일 전송 시 대용량의 파일이 첨부되지 않는 문제가 발생했을 때 여러가지 이유가 있겠지만, 그 중 tomcat 설정의 문제일 경우 다음과 같이 해결할 수 있다.
- Tomcat 서버의 server.xml을 실행하여 Connector 부분을 아래와 같이 수정한다.
1. 업로드 파일 용량 제한 해제 (Default : 2MB)
maxPostSize="-1"
2. 파라미터 갯수 제한 해제
maxParameterCount="-1"
<Connector port="8080" protocol="HTTP/1.1" redirectPort="8443" maxPostSize="-1" maxParameterCount="-1"/>
* apache-tomcat-8.5.78 기준