Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
imholzj
Contributor III
Contributor III

tHttpRequest POST multipart/form-data?

Does the tHttpRequest post the file as a separate part? If so does it set the content-disposition part header for the file as the filname? (or do I have to build the content myself and use tREST somehow?)

The website I'm hitting expects the POST to be multi-part, but I'm guessing Talend just includes the content of the file as a single post.

 

Here is the POST I need to make:

 

POST https://someLMShost.edu/d2l/api/lp/{version}/profile/myProfile/image HTTP/1.1

Content-Type: multipart/form-data; boundary=xxBOUNDARYxx

Content-Length: {POST body length in bytes}

 

--xxBOUNDARYxx

Content-Disposition: form-data; name="profileImage"; filename="my_new_profile_image.png"

Content-Type: image/png

 

{image file data bytes}

--xxBOUNDARYxx--

Labels (2)
1 Reply
Anonymous
Not applicable

Hello,

tHttpRequest component is able to do the POST file over HTTP protocol with custom headers.

You have for the Headers section:

"Content-Type" "multipart/form-data"

"submit" "1"

"upfile" "C:\XXXXXX\YYYY.csv"

Method: POST

And the appropriate authentication.

In addition to that, here is a tfilefetch component which can also send a file.

Best regards

Sabrina