REST Service Binary HTTP Request Body

1
I am publishing a REST service using the built-in functionality in the Modeler (new since 7.10), and I want to accept an HTTP request with a binary request body, and convert that into a FileDocument object in the REST service microflow. Since the HTTP request body comes in as a string, I've tried using the CommunityCommons StringToFile action, but this does not appear to work correctly. I don't see this covered in the documentation, does anyone know what the proper way of doing this is?
asked
3 answers
1

If you use version 7.13 (or later) of the desktop modeler, you can add a file document parameter to your microflow, and it will be filled with the binary content.

answered
0

Hi David,

Is Base64Encoded string an option? We published the flow below as a REST service in 7.13 and works fine. Don't forgot to set your (file)name in the process. 

(ModelShare gave a server error so here's a screenshot)

 

answered
0

Unfortunately not - the file being sent is a PGP-encrypted hexidecimal binary. Once received in the application, it is decrypted and then parsed. This works with the REST Services Module because in that case the input to the microflow is actually a FileDocument (specialization) with extra attributes added matching the http query parameters, and then the content of the FileDocument is automatically updated with the binary contents by the REST module. However, since the built-in functionality works differently, I'm not quite sure how to go about it.

answered