안규 공부방

ACTIVE SERVER PAGE > base64 인코딩된 이미지 다운로드 받기

등록일 : 2017-07-04 18:21 조회수 : 93,182


  'values  
base64String="data:image/gif;base64,R0lGODdhMQAiAPcAAP////f39+/v7+fn597e3s7OzsbGxr29vbW......"


Set tmpDoc = Server.CreateObject("MSXML2.DomDocument")
Set nodeB64 = tmpDoc.CreateElement("b64")
nodeB64.DataType = "bin.base64"
nodeB64.Text = Mid(base64String, InStr(base64String, ",") + 1)

With Response
.Clear
.ContentType = "image/gif"
.AddHeader "Content-Disposition", "attachment; filename=testImage.gif"
.BinaryWrite nodeB64.NodeTypedValue 'get bytes and write
.End
End With
 
※ 혹시 도움이 되셨다면 댓글에 한마디 남겨주세요!
작성자   비밀번호
자동글 방지     (자동글 방지 기능입니다.)
내용   댓글달기 
이메일 문의 : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.