<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: API with PDF attach in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/API-with-PDF-attach/m-p/2546899#M149496</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Recommended Configuration for tHTTPClient&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to &lt;A href="https://help.qlik.com/talend/en-US/components/8.0/http/thttpclient" target="_blank"&gt;Talend component documentation&lt;/A&gt;, tHTTPClient is the modern replacement for tREST and tFileFetch. Use these settings to match Postman’s behavior:&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
 &lt;LI&gt;&lt;STRONG&gt;HTTP Method:&lt;/STRONG&gt; Select &lt;STRONG&gt;POST&lt;/STRONG&gt;.&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;Body Type:&lt;/STRONG&gt; Select &lt;STRONG&gt;Form data&lt;/STRONG&gt; (do &lt;STRONG&gt;not&lt;/STRONG&gt; use &lt;I&gt;x-www-form-urlencoded&lt;/I&gt; for files as it lacks the proper multipart boundaries).&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;Parameters Table:&lt;/STRONG&gt;
  &lt;UL&gt;
   &lt;LI&gt;Add a parameter where the &lt;STRONG&gt;Name&lt;/STRONG&gt; matches the key expected by your API (e.g., "file").&lt;/LI&gt;
   &lt;LI&gt;Set the &lt;STRONG&gt;Value&lt;/STRONG&gt; to the absolute path of your PDF file (e.g., "C:/documents/file.pdf").&lt;/LI&gt;
   &lt;LI&gt;Change the &lt;STRONG&gt;Type&lt;/STRONG&gt; for this specific row to &lt;STRONG&gt;File&lt;/STRONG&gt; (this is critical for the component to treat the value as a file stream rather than a text string).&lt;/LI&gt;
  &lt;/UL&gt;&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;Headers:&lt;/STRONG&gt; Do &lt;STRONG&gt;not&lt;/STRONG&gt; manually set the Content-Type header to multipart/form-data. The Postman automated behavior and Talend's internal client both generate the required &lt;STRONG&gt;boundary&lt;/STRONG&gt; automatically when "Form data" is selected.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Alternative: tFileFetch&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If tHTTPClient continues to fail, many users successfully use &lt;STRONG&gt;tFileFetch&lt;/STRONG&gt; for multipart uploads:&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
 &lt;LI&gt;Go to &lt;STRONG&gt;Advanced Settings&lt;/STRONG&gt;.&lt;/LI&gt;
 &lt;LI&gt;Check the box &lt;STRONG&gt;Upload files&lt;/STRONG&gt;.&lt;/LI&gt;
 &lt;LI&gt;Add your file in the table:
  &lt;UL&gt;
   &lt;LI&gt;&lt;STRONG&gt;Name:&lt;/STRONG&gt; The form field name (e.g., "file").&lt;/LI&gt;
   &lt;LI&gt;&lt;STRONG&gt;File:&lt;/STRONG&gt; Full path to the PDF.&lt;/LI&gt;
   &lt;LI&gt;&lt;STRONG&gt;Content-Type:&lt;/STRONG&gt; application/pdf.&amp;nbsp;&lt;/LI&gt;
  &lt;/UL&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Troubleshooting Tips&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
 &lt;LI&gt;&lt;STRONG&gt;Check the Schema:&lt;/STRONG&gt; Ensure your tHTTPClient output schema includes status, headers, and body (type String) to correctly capture the server's response for debugging.&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;Manual Java Routine:&lt;/STRONG&gt; If the built-in components fail due to complex API requirements, you can use a &lt;A href="https://stackoverflow.com/questions/75766460/talend-send-http-post-request-with-form-data" target="_blank"&gt;Java Routine&lt;/A&gt; to create a custom HttpURLConnection that manually builds the multipart boundary and streams the file&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Apr 2026 20:53:12 GMT</pubDate>
    <dc:creator>Greg_Taffer</dc:creator>
    <dc:date>2026-04-14T20:53:12Z</dc:date>
    <item>
      <title>API with PDF attach</title>
      <link>https://community.qlik.com/t5/Talend-Studio/API-with-PDF-attach/m-p/2546839#M149495</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need to perform a POST call with a PDF file attached.&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;With Postman it works without any issues using &lt;STRONG&gt;form-data&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bonacq_0-1776177213765.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/187778iFD3B59F269D7E594/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bonacq_0-1776177213765.png" alt="bonacq_0-1776177213765.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;The only component that seems suitable for my case in Talend 8.0.1 is &lt;STRONG&gt;tHTTPClient&lt;/STRONG&gt;, but I haven’t found the correct configuration.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Initially, I tried the most straightforward approach:&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bonacq_1-1776177301640.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/187779i57765E583845EC58/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bonacq_1-1776177301640.png" alt="bonacq_1-1776177301640.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;and the attachment definition:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bonacq_2-1776177345268.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/187780i78EA52FA6BB56FF4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bonacq_2-1776177345268.png" alt="bonacq_2-1776177345268.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;but I get: HTTP Query 'http://.../uploadMainDocument' : '400 Bad Request'&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;Using &lt;STRONG&gt;x-www-form-urlencoded&lt;/STRONG&gt;, I add the file path among the body parameters (and remove the attachment), but I get: HTTP Query 'http://.../ws/uploadMainDocument' : '415 Unsupported Media Type'&lt;/P&gt;&lt;P&gt;Has anyone encountered similar situations?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2026 14:47:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/API-with-PDF-attach/m-p/2546839#M149495</guid>
      <dc:creator>bonacq</dc:creator>
      <dc:date>2026-04-14T14:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: API with PDF attach</title>
      <link>https://community.qlik.com/t5/Talend-Studio/API-with-PDF-attach/m-p/2546899#M149496</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Recommended Configuration for tHTTPClient&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to &lt;A href="https://help.qlik.com/talend/en-US/components/8.0/http/thttpclient" target="_blank"&gt;Talend component documentation&lt;/A&gt;, tHTTPClient is the modern replacement for tREST and tFileFetch. Use these settings to match Postman’s behavior:&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
 &lt;LI&gt;&lt;STRONG&gt;HTTP Method:&lt;/STRONG&gt; Select &lt;STRONG&gt;POST&lt;/STRONG&gt;.&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;Body Type:&lt;/STRONG&gt; Select &lt;STRONG&gt;Form data&lt;/STRONG&gt; (do &lt;STRONG&gt;not&lt;/STRONG&gt; use &lt;I&gt;x-www-form-urlencoded&lt;/I&gt; for files as it lacks the proper multipart boundaries).&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;Parameters Table:&lt;/STRONG&gt;
  &lt;UL&gt;
   &lt;LI&gt;Add a parameter where the &lt;STRONG&gt;Name&lt;/STRONG&gt; matches the key expected by your API (e.g., "file").&lt;/LI&gt;
   &lt;LI&gt;Set the &lt;STRONG&gt;Value&lt;/STRONG&gt; to the absolute path of your PDF file (e.g., "C:/documents/file.pdf").&lt;/LI&gt;
   &lt;LI&gt;Change the &lt;STRONG&gt;Type&lt;/STRONG&gt; for this specific row to &lt;STRONG&gt;File&lt;/STRONG&gt; (this is critical for the component to treat the value as a file stream rather than a text string).&lt;/LI&gt;
  &lt;/UL&gt;&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;Headers:&lt;/STRONG&gt; Do &lt;STRONG&gt;not&lt;/STRONG&gt; manually set the Content-Type header to multipart/form-data. The Postman automated behavior and Talend's internal client both generate the required &lt;STRONG&gt;boundary&lt;/STRONG&gt; automatically when "Form data" is selected.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Alternative: tFileFetch&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If tHTTPClient continues to fail, many users successfully use &lt;STRONG&gt;tFileFetch&lt;/STRONG&gt; for multipart uploads:&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
 &lt;LI&gt;Go to &lt;STRONG&gt;Advanced Settings&lt;/STRONG&gt;.&lt;/LI&gt;
 &lt;LI&gt;Check the box &lt;STRONG&gt;Upload files&lt;/STRONG&gt;.&lt;/LI&gt;
 &lt;LI&gt;Add your file in the table:
  &lt;UL&gt;
   &lt;LI&gt;&lt;STRONG&gt;Name:&lt;/STRONG&gt; The form field name (e.g., "file").&lt;/LI&gt;
   &lt;LI&gt;&lt;STRONG&gt;File:&lt;/STRONG&gt; Full path to the PDF.&lt;/LI&gt;
   &lt;LI&gt;&lt;STRONG&gt;Content-Type:&lt;/STRONG&gt; application/pdf.&amp;nbsp;&lt;/LI&gt;
  &lt;/UL&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Troubleshooting Tips&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
 &lt;LI&gt;&lt;STRONG&gt;Check the Schema:&lt;/STRONG&gt; Ensure your tHTTPClient output schema includes status, headers, and body (type String) to correctly capture the server's response for debugging.&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;Manual Java Routine:&lt;/STRONG&gt; If the built-in components fail due to complex API requirements, you can use a &lt;A href="https://stackoverflow.com/questions/75766460/talend-send-http-post-request-with-form-data" target="_blank"&gt;Java Routine&lt;/A&gt; to create a custom HttpURLConnection that manually builds the multipart boundary and streams the file&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2026 20:53:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/API-with-PDF-attach/m-p/2546899#M149496</guid>
      <dc:creator>Greg_Taffer</dc:creator>
      <dc:date>2026-04-14T20:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: API with PDF attach</title>
      <link>https://community.qlik.com/t5/Talend-Studio/API-with-PDF-attach/m-p/2546934#M149498</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the quick reply.&lt;BR /&gt;I've done everything except this point.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Change the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Type&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for this specific row to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;File&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(this is critical for the component to treat the value as a file stream rather than a text string).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bonacq_0-1776238412449.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/187812i07E95ABF78ECFDC1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bonacq_0-1776238412449.png" alt="bonacq_0-1776238412449.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I can't find where to set "Files."&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2026 07:35:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/API-with-PDF-attach/m-p/2546934#M149498</guid>
      <dc:creator>bonacq</dc:creator>
      <dc:date>2026-04-15T07:35:13Z</dc:date>
    </item>
  </channel>
</rss>

