Classic ASP
Classic ASP
Decode Base64 to Zip File
See more Base64 Examples
Shows how to decode a baes64 string that is the encoded representation of the bytes that make up a .zip archive. Decodes the base64 and writes the .zip file.Chilkat Classic ASP Downloads
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
success = 0
b64 = "UEsDBBQA ... AAALgQAAAAA"
set zipData = Server.CreateObject("Chilkat.BinData")
success = zipData.AppendEncoded(b64,"base64")
success = zipData.WriteFile("qa_output/out.zip")
If (success <> 1) Then
Response.Write "<pre>" & Server.HTMLEncode( "failed to write Zip file.") & "</pre>"
Response.End
End If
%>
</body>
</html>