Dear Ivy Team I have the following case: User should be able to upload scanned documents (1...xx MB) via Ivy and the data should be streamed through the REST service (layers). Since each REST service decouples (therefore no shared memory) the memory required to transport the document data could be quite high. To avoid that I would like to stream the data down to the persistency layer. Problem: Currently I am trying to pass binary data -> "In Inscribe Rest Service Call Activity" -> Body, entity -> binary data and content-type=application/octet-stream and read it by the consumer REST service with HttpServletRequest request->getInputStream(). Though here I get an error (InputStream seems to be already closed). Question: Is this approach correct or do I have to use multipart/form-data (if yes, do you have an example, especially if the call is executed by the Ivy REST client). Thanks in advance for a feedback. Best Regards John asked 08.01.2019 at 10:00 John Moser |
Hello It is not possible to send files with the Rest Client Activity. You have to use the Java API. There is story planned to support this feature. But you should can use the plain java api:
answered 14.01.2019 at 03:39 Alex Suter ♦♦ Thank you !
(15.01.2019 at 10:17)
John Moser
|
Hi I am not sure if it only works with multi part form data but with it it should work. Here an example rest service:
Have a nice day answered 08.01.2019 at 10:35 Christian St... ♦ Hi Christian Thanks - but the issue is the REST client of Ivy. In order to post with MediaType.MULTIPART_FORM_DATA, which type of body has to be used -> "raw" or "form" or "entity" ? I assume : raw=write your own html form, form=I can't set to be multipart, entity=I can't set a form param Regards John
(08.01.2019 at 10:51)
John Moser
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 08.01.2019 at 10:00
Seen: 2,178 times
Last updated: 15.01.2019 at 10:17