cancel
Showing results for 
Search instead for 
Did you mean: 

Sending a File as an attachment in to the Body of the POST call

ParasChanana
Level 2
Team,

Greatly appreciate your help here in advance.
One of our inbuilt restAPI accepts multipart file as request param. In postman we have an option to attach a file to Body, how can I do the same in BluePrism?

I am stuck to find ways to attach a file to the BODY in blue prism.

------------------------------
Thanks,
Paras Chanana
------------------------------
2 REPLIES 2

Sven_StienWullu
Level 4
​I guess it's usually done by converting the file to Base64 and putting it into a parameter of a JSON.
For example:
{"messageId" : "5402580", "documentType": "pdf", "document" : {BASE64encoded file}}

------------------------------
Sven Stien Wullum
RPA-developer
Fremtind
Europe/Oslo
------------------------------

{BASE64encoded string} more like, as you're basically converting the entire file into a string.​

------------------------------
Sven Stien Wullum
RPA-developer
Fremtind
Europe/Oslo
------------------------------