I want to upload a file,and I can't use the file upload dialog.I use
xmlhttp to send the file in a xmlhttp request,and how can I get the file
at serverside? Here is the client code
<script>
var ado_stream =new ActiveXObject("adodb.stream");
var xml_dom = new ActiveXObject("msxml2.domdocument");
xml_dom.loadXML('<?xml version="1.0" ?> <root/>');
xml_dom.documentElement.setAttribute("xmlns:dt","urn:schemas-microsoft-com:datatypes");
var node = xml_dom.createElement("update");
node.dataType = "bin.base64";
ado_stream.Type = 1;
ado_stream.Open();
ado_stream.LoadFromFile("c:\\test.xml");
node.nodeTypedValue = ado_stream.Read(-1)
ado_stream.Close();
xml_dom.documentElement.appendChild(node);
var xmlhttp = new ActiveXObject("microsoft.xmlhttp");
xmlhttp.open("post","/workflow/uploadtest",false);
xmlhttp.send(xml_dom);
</script>
on 2009-08-17 15:48
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.