Ok, so I have this problem. We have this document management program (called Celum) that I need to upload a whole bunch of documents to. Celum provides an API but it's an html/XML interface and that's providing me with some difficulties. In order to upload a file I create an html web page as follows:
<html>
<head></head>
<body>
<form method="post" enctype="multipart/form-data" name="uploadForm"
action ="http://[celumserver]/api/upload.api">
Username: <br><input type="text" size="20" maxlength="20" name="username"><br>
Password: <br><input type="password" size="20" maxlength="20" name="password"><br>
TargetFolderID: <br><input type="imput" size="10" maxlength="10" name="folderId"><br>
Choose a file: <br><input type="file" size="40" name="document"><br>
<input type="submit" value="Upload">
</form>
</body>
</html>
And that works fine... for one file... with user intervention. Does anyone have any idea on how I can automate this? I've never done anythign along these lines and I'm stumped. One of the problems I have is the upload file gets attached as a file in an htmlfilecollection (because of the enctype="multipart/form-data") and I'm not 100% sure on how to do this programatically. At some point I'm also going to have to attach a second XML file with metadata but it should be the same idea as the first file. Thanks very much! Nick
Dad always thought laughter was the best medicine, which I guess is why several of us died of tuberculosis. I can picture in my mind a world without war, a world without hate. And I can picture us attacking that world, because they'd never expect it.