Hi All,
I am working on a requirement to create a document in Notes from an asp page. The asp page has a file upload control. I am calling the following agent to create a document in Notes. Everytime the user submits the asp page, a new document is created in Notes with all the required fields, but the uploaded file is missing. There is no file attachment found in the notes document.
Set doc=s.documentcontext
Set objHttp = CreateObject(“Msxml2.ServerXMLHTTP”)
url="https://www.abc.com/xxx.nsf/xmldoc?createdocument
req = “&NameTX=” &doc.UserName(0) & “&DepartmentTX=” & doc.Department(0) & “&filename=abc.txt” ’ hardcoded the file name for testing purposes
Call objHttp.open(“POST”, url, False, “userid”, “passwd”)
objHttp.setRequestHeader “Authorization”, "Basic " & Base64Encode(“userid:passwd”)
REM - Tried each of the following headers with NO success
’ objHttp.setRequestHeader “Content-Type”, “application/x-www-form-urlencoded; charset=UTF-8”
’ objHttp.setRequestHeader “Content-Type”, “multipart/form-data”
’ objHttp.setRequestHeader “ENCTYPE”, “multipart/form-data”
’ objHttp.setRequestHeader “postmode”, “multipart form”
objHttp.Send(req)
Set objHttp = Nothing
I am not sure whatelse to try to get the file attachment onto the Notes document. Please advise.
Thanks and Regards,
Saradhi.