I'm trying to recieve a file from a HTTP POST query that is recieved for an API rest and save it. But I don't know how.
Hi Bruno,
A possible solution is to use the PDF file binary to receive or send by REST.
You can also save the binary in the database, example:
Regards.
Ango,
Hello! I hope you are doing well. It was very usefull!! thanks!!
Good bye.
I'm glad I could help.
Agno,
I did something very similar, but now I'm having troubles testing It, I used to do it with postman, but I dont know how to send a binary pdf in the JSON. Do you know how to do it?
Thanks!!
Hello Bruno,
are you trying to send the binary(PDF) by the postman to Outsystems endpoint?
Yes! That's what I'm trying to do!!
Right,
Steps:
1 - Create an End point REST in Service Studio:
2 - open documentation to get the URL, to use in POSTMAN:
3 - Convert your PDF to binary in some site, example https://base64.guru/converter/encode/pdf
4 - Send by Postman:
I created and application example, see in attachment.
Bruno,
Look this test after send by postman and save binary in database:
Hope this helps.
Again, It works really well!! Thank you so much, I Just copy the binary or base64 text in to postman and it works!!
Good bye!