How to perform a multi-part http post in Talend?

Four Stars

How to perform a multi-part http post in Talend?

I tried tRestClient component to perform a file upload and it failed. I couldn't see the multi-part option in there. I can successfully upload using tFileFetch. Is it possible to write the response to a file when using tFileFetch for POST? Are there any other Talend components that can support multi-part uploads?

Six Stars

Re: How to perform a multi-part http post in Talend?

Hi,

check the cHTTP/cHTTP4 component in Route, should be possible to specify the content type.

 

Mirko

Six Stars

Re: How to perform a multi-part http post in Talend?

But in any case I don't understand why you have to upload a file using a form, instead of posting directly the content.

 

Mirko

Four Stars

Re: How to perform a multi-part http post in Talend?

This is what I trying to achieve in Talend. The reason I need multipart-form is that's what the server what I'm uploading to supports Screen Shot 2017-04-28 at 15.23.50.png

 

Six Stars

Re: How to perform a multi-part http post in Talend?

I am trying to upload (POST) file using tFileFetch component with multipart/form-data. I am not sure what I am doing wrong, it doesn't work for me.

Here are my screenshots: tFileFetch1.GIFtFileFetch2.GIF

Am I missing something?

Appreciate your help.

Ten Stars

Re: How to perform a multi-part http post in Talend?

What error are you encountering? Or does it complete without errors yet not upload the file?
Six Stars

Re: How to perform a multi-part http post in Talend?

Thanks for your response. 

I get the following response. But its not uploading the file.

==================================

Starting job TestJob at 09:55 15/05/2017.

[statistics] connecting to socket on port 3782
[statistics] connected
[statistics] disconnected
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="New Oracle"
Job TestJob ended at 09:55 15/05/2017. [exit code=0]

=======================================

Six Stars

Re: How to perform a multi-part http post in Talend?

Now I get the following response after restarted Talend:

Starting job TestScene7 at 14:09 15/05/2017.

[statistics] connecting to socket on port 3426
[statistics] connected
[INFO ]: org.apache.commons.httpclient.HttpMethodBase - Response content length is not known
Status Line: HTTP/1.1 200 OK
*** Response Header ***
Content-Type: text/xml;charset=utf-8
Content-Length: 233
Date: Mon, 15 May 2017 18:09:10 GMT
Server: Unknown
Connection: close
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="New Oracle"
[statistics] disconnected
Job TestJob ended at 14:09 15/05/2017. [exit code=0]

But its not uploading the data.

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog