cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to upload file to API using HTP Request

IndrajeetRoy
Level 2

Hi All,

I'm working on a project where I need to send a variety of files with different extensions (PDF,xlsx,csv,etc.) to a Document Management System using the API. The API Call uses Content-Type of multipart/form-data. I've been able to upload the document correctly using Postman, but am unable to do so using the same headers and body as postman in the BP HTTP Request action in Utility - HTTP VBO.

I am getting the error no matter if I convert the file to Binary or Base64.

When I try to upload the document, the content type I am getting from the response in Postman is "application/json; charset=UTF-8". For some reason, when doing this in BP the response content type is detected as "multipart/form-data; charset=UTF-8". When this happens, BP gives an error stating "System Exception : multipart/formdata;charset=UTF-8 is a invalid Response Content Type"

I would like some help with this, as it is clear that the request is reaching the API, since when I changed the API Authentication Token a bit I got a response from the API that my token has expired. 

Thanks and Regards,
Indrajeet Roy

3 REPLIES 3

Hi Indrajeet,

Are you using the latest version of the HTTP Utility from DX. It has an action to deal with multipart requests.

IndrajeetRoy
Level 2
@Shashank Kumar: I am working inside the client's VDI, we're not permitted to use anything apart from the inbuilt VBO's and those provided by BP during the initial installation. Unfortunately, even getting the client to think about using anything apart from that is an exercise that will take several months at the very least. ​

The exact name of the VBO I'm using is "Utility - HTTP Extended". Is this the one you're referring to?