cancel
Showing results for 
Search instead for 
Did you mean: 

Send file throu HTTP Post request

MichalKlodner
Level 3
Hi, I know this will be a very general question but I need a direction how to continue with this - I try to send a file via API using VBO 'Utility - HTTP', action 'Post'. I know I should very probably convert the file to binary, which I have done, but how to 'append' it to the request? There is an input of the action called 'Post Data' but it is a collection and I do not know how to structure it. The communication via http works since I get a customized error mesasge that I forgot to append a file. Thanks for any hints. Regards, Michal Klodner
3 REPLIES 3

Anonymous
Not applicable
Hi Michal, I have a similar problem. I gave up sending the file using BluePrism and used the command line to send the file instead. Maybe not the cleanest of solutions, but it works. Regards, Rudi  

AndreyKudinov
Level 10
> There is an input of the action called 'Post Data' but it is a collection and I do not know how to structure it. In general, open HTTP VBO and see how it works. (Or you can always create your own VBO) Basically ""Post Data"" should contain one row, rest is ignored. Get Body stage builds a string from it, for each column in that row in it adds urlencoded ""ColumnName=Value"" pairs separated by & Binary files are normally sent by browser as multipart/form-data instead of application/x-www-form-urlencoded, because latter adds significant overhead for big binary files - it looks like you'd have to create your own action for multipart/form-data, if you need it. Nevertheless, server should be able to accept application/x-www-form-urlencoded file too, which can be sent with HTTP VBO... just be prepared that your request might end up like 2-3 times the size of the actual file.

pranavred
Level 6
Off topic, how do you convert the file name to Binary?
Pranav