<% @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 %>