Dim client As RestSharp.RestClient = New RestSharp.RestClient(Req_URL)
client.Timeout = 10000
Dim request As RestRequest= New RestRequest(RestSharp.Method.POST)
request.AddHeader(“AuthToken”, Token)
request.AddParameter(“binder_ld”, binder_id)
request.AddParameter(“isK1Document”, isK1Document)
request.AddParameter(“isBookmarkOnly”, isBookmarkOnly)
request.AddParameter(“isOCR”, isOCR) 9 request.AddParameter(“documentType”, documentType)
request.AddParameter(“submissionSource”, submissionSource)
request.AddFile(“file”, file)
Dim response As IRestResponse = client.Execute(request)
Console.WriteLine(response.Content.ToString)
ResContent = response.Content.ToString
This is my code for upload documents in API.
It is working fine but only for one document. When I try to upload multiple document using comma separated path it is not working properly.
request.AddFile(“file”, file)
So file is argument which contains file path from Excel.