<?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: Https File Upload with Multipart/Form-Data in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Https-File-Upload-with-Multipart-Form-Data/m-p/2315804#M86423</link>
    <description>Unfortunately it is not supported directly in tRESTClient, 
&lt;BR /&gt;please vote for 
&lt;BR /&gt; 
&lt;A href="https://jira.talendforge.org/browse/TESB-12065" rel="nofollow noopener noreferrer"&gt;https://jira.talendforge.org/browse/TESB-12065&lt;/A&gt; 
&lt;BR /&gt;I guess in meantime any HTTP client that can post multipart payloads can be used in tJavaFlex, Apache HTTPClient or CXF, I can prototype the code for the latter option if it can be of interest 
&lt;BR /&gt; 
&lt;BR /&gt;Sergey</description>
    <pubDate>Mon, 14 Mar 2016 13:20:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-03-14T13:20:09Z</dc:date>
    <item>
      <title>Https File Upload with Multipart/Form-Data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Https-File-Upload-with-Multipart-Form-Data/m-p/2315803#M86422</link>
      <description>I'm working on an integration and need to upload files to an API. &amp;nbsp;The API documentation says to " 
&lt;FONT size="3"&gt;&lt;FONT face="ProximaNova_regular," sans-serif=""&gt;Send your file to&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;POST /pendingfiles.json&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;FONT size="3"&gt;&lt;FONT face="ProximaNova_regular," sans-serif=""&gt;&amp;nbsp;using the FORM field&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;file&lt;/PRE&gt; 
&lt;BR /&gt;" 
&lt;BR /&gt;I tried using tRestClient, but when you select FORM, it sets the content-type as "application/x-www-form-urlencoded". &amp;nbsp;The API doesn't accept that; it has to be multipart/form-data. 
&lt;BR /&gt;I tried using tFileFetch and set the Upload File parameter to True and passed in teh File parameters Name = "file", File = filePath, etc. &amp;nbsp;This actually worked, but I got an error because &amp;nbsp;the response from the API was a 201: Created. &amp;nbsp;Apparently, tFileFetch only considers a 200: OK as an acceptable response. 
&lt;BR /&gt;I tried following this post that suggests customizing tRestClient so that it will accept a multipart form, but I couldn't get the parameter named correctly (form field has to be file) to make it work. &amp;nbsp; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCkLACA0" rel="nofollow noopener noreferrer" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/tRestClient-MIME-Multipart-Form-Data-POST-to-post-zip-file/td-p/73381&lt;/A&gt; 
&lt;BR /&gt;This post explained the problem that tFileFetch only allows a 200 OK response.&amp;nbsp; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCsttCAC" rel="nofollow noopener noreferrer" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/resolved-Upload-file-to-server-that-returns-other-code-200/td-p/191399&lt;/A&gt; 
&lt;BR /&gt;After the last post, I created a new version of tFileFetch and adjusted the accepted responses to 200 OK and 201 Created. &amp;nbsp;It successfully posted the file and gave a correct response. &amp;nbsp; 
&lt;BR /&gt;But now, I need to be able to parse the response to get the file token. &amp;nbsp;When the file successfully uploads, I get a temporary file token that I can then use to attach it to another object in the system. &amp;nbsp;So I have to be able to parse the response to get that file, otherwise it's no good to me. 
&lt;BR /&gt;So I either need to figure out how to adjust tFileFetch so that the response can be sent out as a row or I need to find another way of uploading the file. 
&lt;BR /&gt;I'm not a developer and only understand the basics in Java programming. Any suggestions or help would be greatly appreciated.</description>
      <pubDate>Sat, 16 Nov 2024 10:44:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Https-File-Upload-with-Multipart-Form-Data/m-p/2315803#M86422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T10:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Https File Upload with Multipart/Form-Data</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Https-File-Upload-with-Multipart-Form-Data/m-p/2315804#M86423</link>
      <description>Unfortunately it is not supported directly in tRESTClient, 
&lt;BR /&gt;please vote for 
&lt;BR /&gt; 
&lt;A href="https://jira.talendforge.org/browse/TESB-12065" rel="nofollow noopener noreferrer"&gt;https://jira.talendforge.org/browse/TESB-12065&lt;/A&gt; 
&lt;BR /&gt;I guess in meantime any HTTP client that can post multipart payloads can be used in tJavaFlex, Apache HTTPClient or CXF, I can prototype the code for the latter option if it can be of interest 
&lt;BR /&gt; 
&lt;BR /&gt;Sergey</description>
      <pubDate>Mon, 14 Mar 2016 13:20:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Https-File-Upload-with-Multipart-Form-Data/m-p/2315804#M86423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-14T13:20:09Z</dc:date>
    </item>
  </channel>
</rss>

