J
Jörn Willhöft
Hi there,
I have a form that has embedded picture attachments. IP stores these
internally as base64-encoded xml. Now I need to save these pictures into
files.
I tried the following JScript:
var node =
primaryDom.selectSingleNode("/dfs:myFields/myictures/my:rep_pict");
var fileSystem = new ActiveXObject("Scripting.FileSystemObject");
var file = fileSystem.CreateTextFile("c:\\test.jpeg", true);
file.write(node.text);
file.close();
fileSystem = null;
This does save the contents of the node to the file test.jpeg, BUT it is
still base64 encoded.
How do I decode the base64?
AND, if necessary, how do I create a non-text file from JScript?
Thank you very much,
Jörn
I have a form that has embedded picture attachments. IP stores these
internally as base64-encoded xml. Now I need to save these pictures into
files.
I tried the following JScript:
var node =
primaryDom.selectSingleNode("/dfs:myFields/myictures/my:rep_pict");
var fileSystem = new ActiveXObject("Scripting.FileSystemObject");
var file = fileSystem.CreateTextFile("c:\\test.jpeg", true);
file.write(node.text);
file.close();
fileSystem = null;
This does save the contents of the node to the file test.jpeg, BUT it is
still base64 encoded.
How do I decode the base64?
AND, if necessary, how do I create a non-text file from JScript?
Thank you very much,
Jörn