티스토리 뷰
<%
response.setHeader("Content-Type", "aapplication/x-msdownload");
response.setHeader("Content-Disposition", "attachment;filename=파일명;");
%>
<%=파일내용출력%>
요케 하면 무조건 download가 가능하다..
이래도 이해가 안가신다면
' Feel Free to Add Your Own Content-Types Here
Select Case strFileType
Case ".asf"
ContentType = "video/x-ms-asf"
Case ".avi"
ContentType = "video/avi"
Case ".doc"
ContentType = "application/msword"
Case ".zip"
ContentType = "application/zip"
Case ".xls"
ContentType = "application/vnd.ms-excel"
' Case ".ppt"
' ContentType = "application/vnd.ms-PowerPoint"
Case ".gif"
ContentType = "image/gif"
Case ".jpg", "jpeg"
ContentType = "image/jpeg"
Case ".wav"
ContentType = "audio/wav"
Case ".mp3"
ContentType = "audio/mpeg3"
Case ".mpg", "mpeg"
ContentType = "video/mpeg"
Case ".rtf"
ContentType = "application/rtf"
Case ".htm", "html"
ContentType = "text/html"
Case ".asp"
ContentType = "text/asp"
Case Else
'Handle All Other Files
ContentType = "application/octet-stream"
End Select
[자료 출처]
http://blog.ohmynews.com/icorea77/35629
상세 내용 : http://www.iana.org/assignments/media-types/index.html
- Total
- Today
- Yesterday
- .submit()
- 람다식(lambda expression)
- 인텔리제이(intellij)
- java-개발 환경 설정하기
- 스프링 프레임워크(spring framewordk)
- System.Diagnostics
- 메이븐(maven)
- 문자 자르기
- jstl(java standard tag library)
- 제품 등록
- 스프링 시큐리티(spring security)-http basic 인증
- java 키워드 정리
- MainActor
- java.sql
- java web-mvc
- REST API
- await
- React
- 특정 문자를 기준으로 자르기
- jstl(java standard tag library)-core
- 진수 변환
- 스프링 프레임워크(spring framework)
- In App Purchase
- docker
- 표현 언어(expression language)
- nl2br
- 스프링 시큐리티(spring security)
- error-java
- system.io
- jsp 오픈 소스
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |