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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Francis28
Contributor
Contributor

POST image binary file in a string field

Hello,

I must upload image files located on a local server to an API with TALEND

Definition of the API is as below

0695b00000ociWgAAI.png

Field "fichier" (string type) must content binary file of the image

0695b00000ociXAAAY.png

All Images of the defined folder must be loaded in an Oracle table

And then uploaded in the API with TALEND

I don't find how to do this with TALEND.

Any idea how I can do that ?

All suggestion are welcome 🙂

Thanks in advance for your help

Regards

Francis

Labels (3)
3 Replies
anselmopeixoto
Partner - Creator III
Partner - Creator III

Hello @Francis Noyeau​ 

 

Use tFileInputRaw component to read the file as bytes array and connect it to a tDBOutput to write the file contents in a BLOB column.

 

You'll be able to read the images from that table using tDBInput with bytes[] as the BLOB column data type and then you just need to send it to the API using tRESTClient.

Francis28
Contributor
Contributor
Author

Hello @Anselmo Peixoto​ 

 

Thank you for your feedback and to put me on the right way.

 

I successfully implemented the first step and now get an Oracle table with a BLOB column with image file contents.

 

I am now trying to send it to the API using tRESTClient as you suggested BUT I don't find how to send BLOB data from the tDBInput to the tRESTClient component

 

tDBInput has a column of byte[] / BLOB type

 

0695b00000od4zuAAA.pngAnd tRESTClient requests a string column, isn't it ?

 

Hoping you understand my problem and you will be able to help me

 

Best regards

 

Francis

 

Francis28
Contributor
Contributor
Author

Hello,

I get more information about API expectation

I must upload the image file with a form-data format like this:

0695b00000odHP6AAM.png0695b00000odHPLAA2.png 

It seems to be not possible with tRestClient, also I tried with a tFileFetch but I didn't find how to configure the component to get it worked.

 

Any idea ?

 

Thanks in advance

Best Regards

Francis