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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mscarrick1
Partner - Contributor II
Partner - Contributor II

Upload image file using thttpclient or similar.

Hello.  I'm trying to upload a .jpeg image file to a 3rd party API.

 

Postman works successfully as the images show below:

mscarrick1_0-1750861684350.png

mscarrick1_1-1750861732368.png

However, I'd like to do this in Talend.

I've tried using thttpclient and trestclient, encoding it as Base64, everything I can think of... Most responses are similar to 415 - Media type not supported.

Could anyone advise on how best to do this or suggest something different?  My testing looks like this at the moment:

mscarrick1_2-1750861865436.png  

mscarrick1_4-1750861961477.png

mscarrick1_5-1750861997832.png

 

Many thanks.

 

Labels (2)
5 Replies
Dave_Simo
Creator II
Creator II

Hello @mscarrick1 

I've done this kind of thing with tRest and with tFileFetch it works too.

 

Best Regards

mscarrick1
Partner - Contributor II
Partner - Contributor II
Author

Thanks. 

 

I'd read this might be possible but as they are both now deprecated in favour of thttpclient I no longer have that option.

Dave_Simo
Creator II
Creator II

Hello @mscarrick1 

Ah, they deprecated these components in v8.

Okay, I think with tHttpClient, we should do something like the following, replacing tRest with tHttpClient.

Dave_Simo_0-1750926677022.pngDave_Simo_1-1750926701867.pngDave_Simo_2-1750926723833.png

Best Regards

KHANINI
Contributor
Contributor

hello @mscarrick1 
i have the same issue 

do you have any update ? 

mscarrick1
Partner - Contributor II
Partner - Contributor II
Author

I did succeed in the end. I can post screen shots next week but from memory:

I didn't use the tfileinputraw or tconverttype. The thttpclient on is own is enough. 

Don't use the "add attachments" option in advanced settings.

Instead, set the "request body" (i think that is correct??) In basic settings, set it to 'binary' and add the path to your file.