Unable to upload file to API using HTP Request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-05-22 08:14 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-05-22 08:44 AM
Are you using the latest version of the HTTP Utility from DX. It has an action to deal with multipart requests.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-05-22 09:02 AM
The exact name of the VBO I'm using is "Utility - HTTP Extended". Is this the one you're referring to?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-05-22 09:21 AM
https://digitalexchange.blueprism.com/dx/entry/3439/solution/utility---http
