Forum Post: RE: Rest API Call setBinaryField() for sending attachment to Rollbase

  • Thread starter Thread starter IramK
  • Start date Start date
Status
Not open for further replies.
I

IramK

Guest
I have tried this now and it looks like its almost there. objHTTP.Open "POST", ServerStr & "/rest/api/setDataField?", False objHTTP.setRequestHeader "Content-Type", "multipart/form-data; Charset=UTF-8; boundary=" + Boundary objHTTP.setRequestHeader "Content-Length", Len(attachStr) objHTTP.setRequestHeader "Content-Disposition", "form-data; name='file'" objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" objHTTP.Send ("sessionId=" & IdRet & "&id=" & recordIDStr & "&fieldName=file&value=" & attachStr & _ "&contentType=application/vnd.openxmlformats-officedocument.presentationml.presentation&fileName=" & attachNameStr) Getting this error now: ?xml version="1.0" encoding="UTF-8" ? resp status="fail" err Corrupt form data: premature ending /err /resp Any suggestions?

Continue reading...
 
Status
Not open for further replies.
Back
Top