I
IramK
Guest
Hello Ricardo, Could you tell me as to how did you get the Content Length? I am using VBA and I calculated my content length from the string length of my base64 string. Is that correct? Also now it partially seems to work but now I am getting an error : No URL parameter "sessionId" (case-sensitive) Dim ContentLength As Long ContentLength = Len(attachStr) objHTTP.Open "POST", ServerStr & "/rest/api/setDataField?", False objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" objHTTP.setRequestHeader "Content-Length", ContentLength objHTTP.setRequestHeader "Content-Disposition", "form-data;name='file';filename='RB_User_Guide.pdf" objHTTP.setRequestHeader "User-Agent", "Apache-HttpClient/4.1.1" objHTTP.Send ("sessionId=" & IdRet & "&objName=temphistoryattachment&id=" & recordIDStr & "&fieldName=file&value=" & attachStr & "&contentType=application/pdf&fileName=" & attachNameStr & "&output=xml") Output: ?xml version="1.0" encoding="UTF-8" ? resp status="fail" err No URL parameter "sessionId" (case-sensitive) /err /resp
Continue reading...
Continue reading...