The code sends an xml file and a command.
fso = new ActiveXObject("Scripting.FileSystemObject");
xmlFile = fso.OpenTextFile(AJobFile, 1);
xmlText = xmlFile.ReadAll();
var boundStr = 'h8w95k20d9';
var boundary = '--' + boundStr;
var requestbody = [boundary,
'Content-Disposition: file; name="F1";
filename="'+AJobFile+'"',
'Content-Type: text/xml',
'',
xmlText,
boundary,
'Content-Disposition: form-data; name="ImportJobs"',
'',
'0',
boundary
].join('\r\n');
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
url='http://'+WODAddress+'/JTI';
xmlhttp.open("POST",url,false);
xmlhttp.setRequestHeader('Content-type', 'multipart/form-data; boundary="'
+ boundStr + '"');
xmlhttp.send(requestbody );
or you can use webclient which has support for this (fileupload). just be
sure to set the content-type.
-- bruce (sqlwork.com)