<?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: Error while upload a file with API using multipart form data in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61020#M14388</link>
    <description>Hi &lt;A class="user-content-mention" data-sign="@" data-contactkey="da6489ca-cfe4-4f4a-8b4a-a7de93df2f36" data-tag-text="@Michael Krey" href="https://community.blueprism.com/network/profile?UserKey=da6489ca-cfe4-4f4a-8b4a-a7de93df2f36" data-itemmentionkey="2a32f083-987c-4e5b-b96c-5e05fa62bd8d"&gt;@Michael Krey&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;From the attachments it shows that Postman is attaching the PDF to the request as raw binary data whereas the Blue Prism request is attaching data to the request in base64. So something is being sent, but it isn't being processed by the server because the server is expecting a PDF (based on Content-Type: application/pdf) whereas the content it's receiving encoded.&lt;BR /&gt;&lt;BR /&gt;You're still using the same Web API that you showed in your original submission, correct? So you're passing the PDF into the request as a binary data item named &lt;STRONG&gt;Datei&lt;/STRONG&gt;?&lt;BR /&gt;&lt;BR /&gt;Cheers,​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Eric Wilson&lt;BR /&gt;Director, Integrations and Enablement&lt;BR /&gt;Blue Prism Digital Exchange&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Thu, 03 Nov 2022 13:47:00 GMT</pubDate>
    <dc:creator>ewilson</dc:creator>
    <dc:date>2022-11-03T13:47:00Z</dc:date>
    <item>
      <title>Error while upload a file with API using multipart form data</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61016#M14384</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm try to upload a document in a third party API.&lt;/P&gt;
&lt;P&gt;My problem is, that I get these error when I try to send the request out of Blue Prism.&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="13572.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/13734i4260342C485AE349/image-size/large?v=v2&amp;amp;px=999" role="button" title="13572.jpg" alt="13572.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Postman I'm able to upload the file with a PATCH request.&lt;/P&gt;
&lt;P&gt;This is how I build the request in Postman:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="13573.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/13737iC46E4602B96CB271/image-size/large?v=v2&amp;amp;px=999" role="button" title="13573.jpg" alt="13573.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;And these are my settings in Blue Prism:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="13574.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/13735i8B3D6810780883EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="13574.jpg" alt="13574.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="13575.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/13739i7A3AF051AA79B775/image-size/large?v=v2&amp;amp;px=999" role="button" title="13575.jpg" alt="13575.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="13577.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/13740i87D6AD879D6874DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="13577.jpg" alt="13577.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I load the file in a binary data item with ‚LoadBinaryFile([Pfad Anhang])'.&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="13578.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/13742iC23891E136CF9AFB/image-size/large?v=v2&amp;amp;px=999" role="button" title="13578.jpg" alt="13578.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried to use the body content ‚single file' as in the bpdocs suggested. But the API needs the field ‚meta', so I have to set the body contet as template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also found out that if I leave the data item fort he file empty, the request is succesful. But of course no file is uploaded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can somebody help me with that issue?&lt;BR /&gt;&lt;BR /&gt;Thanks a lot&lt;BR /&gt;Michael&lt;/P&gt;
&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Michael Krey&lt;BR /&gt;RPA Consultant&lt;BR /&gt;providata GmbH&lt;BR /&gt;Freiburg&lt;BR /&gt;------------------------------</description>
      <pubDate>Thu, 20 Oct 2022 11:15:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61016#M14384</guid>
      <dc:creator>michael.krey</dc:creator>
      <dc:date>2022-10-20T11:15:00Z</dc:date>
    </item>
    <item>
      <title>RE: Error while upload a file with API using multipart form data</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61017#M14385</link>
      <description>Hi Michael,&lt;BR /&gt;&lt;BR /&gt;We've seen this scenario (a 500 error when uploading multi-part data) in the past with customers integrating Blue Prism with Appian. The issue is usually related to how Blue Prism transmits the body of the JSON file. &lt;BR /&gt;&lt;BR /&gt;While you may not be using Appian in particular, &lt;A href="http://portal.blueprism.com/customer-support/support-center#/path/1566672412" target="_blank" rel="noopener"&gt;this KB article&lt;/A&gt; may be of some use. It suggests to inspect the JSON file being transmitted by Blue Prism to check if the data is being passed in a collection or not, and adjust the endpoint to allow for (Content) -- i.e. a Collection in a single item, if possible.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Steve Boggs&lt;BR /&gt;Senior Product Support Engineer&lt;BR /&gt;Blue Prism&lt;BR /&gt;Austin, TX&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Oct 2022 14:19:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61017#M14385</guid>
      <dc:creator>steven.boggs</dc:creator>
      <dc:date>2022-10-20T14:19:00Z</dc:date>
    </item>
    <item>
      <title>RE: Error while upload a file with API using multipart form data</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61018#M14386</link>
      <description>Hi &lt;A class="user-content-mention" data-sign="@" data-contactkey="da6489ca-cfe4-4f4a-8b4a-a7de93df2f36" data-tag-text="@Michael Krey" href="https://community.blueprism.com/network/profile?UserKey=da6489ca-cfe4-4f4a-8b4a-a7de93df2f36" data-itemmentionkey="43c46f7b-af93-4ceb-8a7c-e94d8ee546f1"&gt;@Michael Krey&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;One other thing to consider is whether you need to Base64 encode the binary data before attaching it to the form submission. This is quite often the case. If you have Fiddler you can capture the Postman an BP submissions and compare the contents of the submissions to see how they differ.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Eric Wilson&lt;BR /&gt;Director, Integrations and Enablement&lt;BR /&gt;Blue Prism Digital Exchange&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 20 Oct 2022 14:34:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61018#M14386</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-10-20T14:34:00Z</dc:date>
    </item>
    <item>
      <title>RE: Error while upload a file with API using multipart form data</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61019#M14387</link>
      <description>&lt;P&gt;Hi @Eric Wilson,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for your advice with Fiddler. By analyzing the submissions I found out that one problem was with the boundary. Now I put in the boundary via parameters and not the request works without an error. Unfortunately the file is still not uploaded.&lt;/P&gt;
&lt;P&gt;Here are my analysis oft he submissions.&lt;/P&gt;
&lt;P&gt;It seems to me, that the file contend in the BluePrism submission isn't shown or translated correct. Could this be what you've mentioned about the Base64 encoding? If yes, how I can encode the file?&lt;/P&gt;
&lt;P&gt;Thanks for your help and best regards&lt;/P&gt;
&lt;P&gt;Michael&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Michael Krey&lt;BR /&gt;RPA Consultant&lt;BR /&gt;providata GmbH&lt;BR /&gt;Freiburg&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Nov 2022 12:11:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61019#M14387</guid>
      <dc:creator>michael.krey</dc:creator>
      <dc:date>2022-11-03T12:11:00Z</dc:date>
    </item>
    <item>
      <title>RE: Error while upload a file with API using multipart form data</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61020#M14388</link>
      <description>Hi &lt;A class="user-content-mention" data-sign="@" data-contactkey="da6489ca-cfe4-4f4a-8b4a-a7de93df2f36" data-tag-text="@Michael Krey" href="https://community.blueprism.com/network/profile?UserKey=da6489ca-cfe4-4f4a-8b4a-a7de93df2f36" data-itemmentionkey="2a32f083-987c-4e5b-b96c-5e05fa62bd8d"&gt;@Michael Krey&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;From the attachments it shows that Postman is attaching the PDF to the request as raw binary data whereas the Blue Prism request is attaching data to the request in base64. So something is being sent, but it isn't being processed by the server because the server is expecting a PDF (based on Content-Type: application/pdf) whereas the content it's receiving encoded.&lt;BR /&gt;&lt;BR /&gt;You're still using the same Web API that you showed in your original submission, correct? So you're passing the PDF into the request as a binary data item named &lt;STRONG&gt;Datei&lt;/STRONG&gt;?&lt;BR /&gt;&lt;BR /&gt;Cheers,​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Eric Wilson&lt;BR /&gt;Director, Integrations and Enablement&lt;BR /&gt;Blue Prism Digital Exchange&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Nov 2022 13:47:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61020#M14388</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-11-03T13:47:00Z</dc:date>
    </item>
    <item>
      <title>RE: Error while upload a file with API using multipart form data</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61021#M14389</link>
      <description>Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/833"&gt;@ewilson&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;yes I'm still using the same Web API, that's correct. And I use the data item 'Datei' to pass the PDF.&lt;BR /&gt;In my corresponding object I load the file with 'LoadBinaryFile' and pass it in the API.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Michael&lt;BR /&gt;​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Michael Krey&lt;BR /&gt;RPA Consultant&lt;BR /&gt;providata GmbH&lt;BR /&gt;Freiburg&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Nov 2022 13:29:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61021#M14389</guid>
      <dc:creator>michael.krey</dc:creator>
      <dc:date>2022-11-07T13:29:00Z</dc:date>
    </item>
    <item>
      <title>RE: Error while upload a file with API using multipart form data</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61022#M14390</link>
      <description>&lt;A class="user-content-mention" data-sign="@" data-contactkey="da6489ca-cfe4-4f4a-8b4a-a7de93df2f36" data-tag-text="@Michael Krey" href="https://community.blueprism.com/network/profile?UserKey=da6489ca-cfe4-4f4a-8b4a-a7de93df2f36" data-itemmentionkey="553cbc20-445a-4ffa-9faf-307914ee8631"&gt;@Michael Krey&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;One issue I see is that your ending &lt;STRONG&gt;[boundary]&lt;/STRONG&gt; needs to have two dashes at the end (ex. ​------WebKitFormBoundary7MA4YWxkTrZu0gW--). The two dashes at the end notify the receiving server that it's the final boundary of the upload (i.e. end of the request). So in your Web API definition you could change that part of the template to look like this &lt;STRONG&gt;[boundary]--&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;I'm still not sure why the data represented in the two captures looks different though. Did you pull both of these from Fiddler or did you grab the Postman capture directly from Postman? I've checked with engineering and they said they &lt;STRONG&gt;do not&lt;/STRONG&gt; Base64 submissions within the product.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Eric Wilson&lt;BR /&gt;Director, Integrations and Enablement&lt;BR /&gt;Blue Prism Digital Exchange&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Nov 2022 15:18:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61022#M14390</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-11-07T15:18:00Z</dc:date>
    </item>
    <item>
      <title>RE: Error while upload a file with API using multipart form data</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61023#M14391</link>
      <description>&lt;A class="user-content-mention" data-sign="@" data-contactkey="da6489ca-cfe4-4f4a-8b4a-a7de93df2f36" data-tag-text="@Michael Krey" href="https://community.blueprism.com/network/profile?UserKey=da6489ca-cfe4-4f4a-8b4a-a7de93df2f36" data-itemmentionkey="770522cc-4afe-4822-936b-a6233c9a0018"&gt;@Michael Krey&lt;/A&gt; &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/833"&gt;@ewilson&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;I had a similar issue earlier with another api. It might help to add HTTP header that calls out that the data is Base64 encoded .&lt;BR /&gt;See highlighted in red below.&lt;BR /&gt;​&lt;span class="lia-inline-image-display-wrapper" image-alt="13546.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/13711i9A0B80AB10F22DF2/image-size/large?v=v2&amp;amp;px=999" role="button" title="13546.png" alt="13546.png" /&gt;&lt;/span&gt;​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Shashank Kumar&lt;BR /&gt;DX Integrations Partner Consultant&lt;BR /&gt;Blue Prism&lt;BR /&gt;Singapore&lt;BR /&gt;+6581326707&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Nov 2022 05:35:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61023#M14391</guid>
      <dc:creator>shashank.kumar280</dc:creator>
      <dc:date>2022-11-08T05:35:00Z</dc:date>
    </item>
    <item>
      <title>RE: Error while upload a file with API using multipart form data</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61024#M14392</link>
      <description>&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/833"&gt;@ewilson&lt;/a&gt; &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1537"&gt;@shashank.kumar280&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you very much for your help. Finally it works. You really made my day!&lt;BR /&gt;&lt;BR /&gt;Best regard&lt;BR /&gt;Michael​​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Michael Krey&lt;BR /&gt;RPA Consultant&lt;BR /&gt;providata GmbH&lt;BR /&gt;Freiburg&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Nov 2022 16:03:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61024#M14392</guid>
      <dc:creator>michael.krey</dc:creator>
      <dc:date>2022-11-08T16:03:00Z</dc:date>
    </item>
    <item>
      <title>RE: Error while upload a file with API using multipart form data</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61025#M14393</link>
      <description>Leave it to &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1537"&gt;@shashank.kumar280&lt;/a&gt; to save the day. &lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Eric Wilson&lt;BR /&gt;Director, Integrations and Enablement&lt;BR /&gt;Blue Prism Digital Exchange&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Nov 2022 16:06:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Error-while-upload-a-file-with-API-using-multipart-form-data/m-p/61025#M14393</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-11-08T16:06:00Z</dc:date>
    </item>
  </channel>
</rss>

