Files
KIN/barobill/convImg/createTaxFile.asp
2025-09-29 17:55:08 +09:00

23 lines
649 B
Plaintext

<% @Language="VBScript" CODEPAGE="65001" %>
<%
imgData = Request("imgdata")
ntsNum = Request("ntsnum")
filepath = "/UpLoad/DOC_ATTACH/tax/" & ntsNum & "_img.jpg"
Set CAPIUtil = Server.CreateObject("CAPICOM.Utilities")
strEncoded = imgdata
Set Stream = Server.CreateObject("ADODB.Stream")
strDecoded = CAPIUtil.Base64Decode(strEncoded) '디코딩.
strFile2 = CAPIUtil.BinaryStringToByteArray(strDecoded) 'ByteArry로 변환
Stream.Type = 1
Stream.Open
Stream.Write strFile2
Stream.SaveToFile Server.MapPath(filepath), 2
Stream.Close
Set Stream = nothing
Response.Write filepath
%>