I have a file in the local directory called unnamed.jpg
I set up this script to test and send this file via api
I need to send this file via api rest in form-data format
How do I convert this file "c: \ temp \ unnamed.jpg"
to the form-data format to pass the file by parameter via NotesHTTPRequest ?
I can't send the file. How should I convert it to the correct format and how do
I pass the file parameter in the body?
Dim session As New notessession
Dim teamsURL As String,Body As String,Message as string
message="c:\temp\unnamed.jpg"
teamsURL="https://demo.d4sign.com.br/api/v1/documents/{UUID-DOC-PRINCIPAL}/uploadslave"
Dim http As NotesHTTPRequest
Set http=session.CreateHTTPRequest()
Body=|{"file":"|+Message+|"}|
Call http.SetHeaderField("ContentType","multipart/form-data;")
Call http.SetHeaderField("tokenAPI","xxxxxx")
Call http.SetHeaderField("cryptKey","yyyy")
Call http.Post(teamsURL,Body)