How to generate a file from base64 binary stream tusing java script
-
Hi I have converted the whole file content to base64 binary stream using the below java script code. After converting I persisted into the database column. fileNode.dataType = "bin.base64"; // open stream object and read source file var adoStream = new ActiveXObject("ADODB.Stream"); if (adoStream.State != 1) { adoStream.Type = 1; // 1=adTypeBinary adoStream.Open(); adoStream.LoadFromFile(strFileName); } I can also retrieve the same base64 content to client side. Now I want to generate the same file using the base64 content. Can anyone tell me now how to convert the base64 to original file format using java script.
-
Hi I have converted the whole file content to base64 binary stream using the below java script code. After converting I persisted into the database column. fileNode.dataType = "bin.base64"; // open stream object and read source file var adoStream = new ActiveXObject("ADODB.Stream"); if (adoStream.State != 1) { adoStream.Type = 1; // 1=adTypeBinary adoStream.Open(); adoStream.LoadFromFile(strFileName); } I can also retrieve the same base64 content to client side. Now I want to generate the same file using the base64 content. Can anyone tell me now how to convert the base64 to original file format using java script.