Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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--
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