개발/ASP.NET
업로드 파일 용량 제어하기
한번사는인생.
2017. 9. 21. 09:42
업로드 파일 용량 조절하기
web.config 에서 처리해준다.
간단한 내용이지만, 파일을 업로드 해주어야 한다.
기본 업로드 용량은 4MB 입니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 | <system.web> <!-- 1MB = 1024bytes --> <httpRuntime targetFramework="4.5" executionTimeout="3600" maxRequestLength="51200" /> </system.web> <system.webServer> <security> <requestFiltering> <!-- maxAllowedContentLength 단위는 Kilobyte, 1M B = 1048576KB --> <!-- IIS에서 핸들링 --> <requestLimits maxAllowedContentLength="52428800" /> </requestFiltering> </security> </system.webServer> | cs |
단위
1024bytes = 1KB, KB = Kilobyte
1024KB = 1MB, MB = Megabyte
1024MB = 1GB, GB = Gigabyte
1024GB = 1TB, TB = Terabyte
1024TB = 1PB, PB = Petabyte