base64 - Write binary file with Javascript and ADODB.Stream -
base64 - Write binary file with Javascript and ADODB.Stream -
i'm making hta application , need save base64-encoded zip archive file.
var stream = new activexobject('adodb.stream'); stream.type = 1; stream.open(); stream.write(atob(data)); stream.savetofile('dump.zip'); stream.close();
this code throw error on stream.write(data) arguments of wrong type, out of acceptable range, or in conflict 1 another.
there solutions vbscript, i'm trying create on javascript.
thanks this post
var stream = new activexobject('adodb.stream'); stream.type = 2; //stream type - text info o_0 stream.charset = "windows-1251"; //windows-1252 works stream.write(atob(data)); stream.savetofile('dump.zip'); stream.close();
i still don't understand why must save binary info text, works.
javascript base64 activex hta
Comments
Post a Comment