Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I must upload image files located on a local server to an API with TALEND
Definition of the API is as below
Field "fichier" (string type) must content binary file of the image
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
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.
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
And tRESTClient requests a string column, isn't it ?
Hoping you understand my problem and you will be able to help me
Best regards
Francis
Hello,
I get more information about API expectation
I must upload the image file with a form-data format like this:
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