tRestRequest incoming attachment handling

One Star

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
Seventeen Stars

Re: tRestRequest incoming attachment handling

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.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read