Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tRestRequest incoming attachment handling

Hi,
what is the best practice to handle incoming attachment of a REST service?
We would like to have a REST service capable of accepting attachment/file, storing this file and processing it, resulting in a kind of response.
How can this be handled?
One of the possibilities is to have an incoming file encoded in base64 and added into a REST Request as a Header, then parsing the Headers for parameter, retrieving the value of this parameter, decoding the file and storing/using it.

Is there a way of accessing attachments of a REST service? If yes, can you provide a java code/example for it?

Thank you in advance
Labels (4)
1 Reply
Anonymous
Not applicable
Author

An attachment for a REST service? Never heard about that! The only way is to send the attachment and all other parameters as form parameter and configure the tRESRequest to accept formula data. The parameter containing the attachment should be configured as byte[].
One standard conform way to send binary data is to convert the data into a Base64 string and send this string as json value.