asp.net - PHP to ASP base64_decode -
i have working php code creates image string of data, , wondering how convert asp:
$jpg = base64_decode($_post['imagedata']); header('content-type: image/jpeg'); header("content-disposition: attachment; filename=".$_get['name']); echo $jpg;
is along lines of following code?
var image = request.params["imagedata"]; if (string.isnullorempty(imagedata)) return; var imagecontent = convert.frombase64string(image); response.contenttype = "image/jpeg"; using (var os = response.outputstream) { (int = 0; < imagecontent.length; i++) os.writebyte(imagecontent[i]); os.flush(); os.close(); }
thanks!
Comments
Post a Comment