<%@ Language=VBScript%>
<%
old_codepage = Session.CodePage
Session.CodePage = "65001"
filepath = request("filepath")
filename = request("filename")
encodename = Server.UrlEncode(filename)
delimiter = InStrRev(encodename, "%2E")
if delimiter <> 0 then
tempname = Left ( encodename, delimiter - 1 )
temptype = Right ( encodename, Len(encodename) - delimiter - 2 )
encodename = replace( tempname & "." & temptype, "+" ,"%20" )
end if
'Response.AddHeader "Content-Disposition", "inline;filename=" & encodename
Response.AddHeader "Content-Disposition", "attachment;filename=" & encodename
'다운로드 개체생성
Set objDownload = Server.CreateObject("DEXT.FileDownload")
objDownload.Download filepath, filename, true, false
Set objDownload = Nothing
Session.CodePage = old_codepage
%> |