<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Document Upload- WebAPI</title><link>https://community.appian.com/discussions/f/integrations/38262/document-upload--webapi</link><description>I have a requirement where user can pass document and it gets uploaded to an Appian&amp;#39;s folder. I have created a WebAPI (Document Upload) and positive scenario is working as expected. 
 For Negative Scenario (When we are not passing any document): 
 1.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144544?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2025 07:41:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:740fff11-85b1-49ba-b649-a4848fdc5218</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Then you need to adapt your validation. It is not the body that is null or not, but your body contains a JSON structure and a field called &amp;quot;value&amp;quot; that is null or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144542?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2025 07:27:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:53d63cdb-7cac-4fd1-b85e-f7230a7b9a0c</guid><dc:creator>Puru Gope</dc:creator><description>&lt;p&gt;Hi Stephan,&lt;/p&gt;
&lt;p&gt;Ideally it should go to error handling and should give &amp;quot;404- Document Not Found&amp;quot; if no document is sent.&lt;/p&gt;
&lt;p&gt;But if you see the response it is generating a document by itself and giving as :&amp;nbsp;&lt;span&gt;&amp;quot;Response Body&amp;quot;: &amp;quot;Upload Successful: 25222 - Untitled document from web API.txt&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144538?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2025 06:59:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4974211a-d621-4829-a270-3f5d19aa0573</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/18/pastedimage1737442795787v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144536?ContentTypeID=1</link><pubDate>Tue, 21 Jan 2025 06:28:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2b91dd5b-c113-4205-ad65-310af5504fa5</guid><dc:creator>Puru Gope</dc:creator><description>&lt;p&gt;PFB, the requested details:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;#39;Binary file load error: invalid or missing file source&amp;#39;&lt;br /&gt;POST https://**********.appiancloud.com/suite/webapi/upload-test-document: {&lt;br /&gt; &amp;quot;Network&amp;quot;: {&lt;br /&gt; &amp;quot;addresses&amp;quot;: {&lt;br /&gt; &amp;quot;local&amp;quot;: {&lt;br /&gt; &amp;quot;address&amp;quot;: &amp;quot;1**.1*.*.2&amp;quot;,&lt;br /&gt; &amp;quot;family&amp;quot;: &amp;quot;IPv4&amp;quot;,&lt;br /&gt; &amp;quot;port&amp;quot;:5***6&amp;nbsp;&lt;br /&gt; },&lt;br /&gt; &amp;quot;remote&amp;quot;: {&lt;br /&gt; &amp;quot;address&amp;quot;: &amp;quot;7*.***.*.*5&amp;quot;,&lt;br /&gt; &amp;quot;family&amp;quot;: &amp;quot;IPv4&amp;quot;,&lt;br /&gt; &amp;quot;port&amp;quot;: 443&lt;br /&gt; }&lt;br /&gt; },&lt;br /&gt; &amp;quot;tls&amp;quot;: {&lt;br /&gt; &amp;quot;reused&amp;quot;: false,&lt;br /&gt; &amp;quot;authorized&amp;quot;: true,&lt;br /&gt; &amp;quot;authorizationError&amp;quot;: null,&lt;br /&gt; &amp;quot;cipher&amp;quot;: {&lt;br /&gt; &amp;quot;name&amp;quot;: &amp;quot;*******-RSA-******-***-SHA256&amp;quot;,&lt;br /&gt; &amp;quot;standardName&amp;quot;: &amp;quot;TLS_***********************&amp;quot;,&lt;br /&gt; &amp;quot;version&amp;quot;: &amp;quot;TLSv1.2&amp;quot;&lt;br /&gt; },&lt;br /&gt; &amp;quot;protocol&amp;quot;: &amp;quot;TLSv1.2&amp;quot;,&lt;br /&gt; &amp;quot;ephemeralKeyInfo&amp;quot;: {&lt;br /&gt; &amp;quot;type&amp;quot;: &amp;quot;ECDH&amp;quot;,&lt;br /&gt; &amp;quot;name&amp;quot;: &amp;quot;prime256v1&amp;quot;,&lt;br /&gt; &amp;quot;size&amp;quot;: 256&lt;br /&gt; },&lt;br /&gt; &amp;quot;peerCertificate&amp;quot;: {&lt;br /&gt; &amp;quot;subject&amp;quot;: {&lt;br /&gt; &amp;quot;commonName&amp;quot;: &amp;quot;*.appiancloud.com&amp;quot;,&lt;br /&gt; &amp;quot;alternativeNames&amp;quot;: &amp;quot;DNS:*.appiancloud.com, DNS:*.api.appiancloud.com, DNS:api.appiancloud.com, DNS:*.appiancloud-dynamic.com, DNS:appiancloud.com, DNS:appiancloud-static.com, DNS:appiancloud-dynamic.com, DNS:*.appiancloud-static.com&amp;quot;&lt;br /&gt; },&lt;br /&gt; &amp;quot;issuer&amp;quot;: {&lt;br /&gt; &amp;quot;country&amp;quot;: &amp;quot;US&amp;quot;,&lt;br /&gt; &amp;quot;organization&amp;quot;: &amp;quot;Amazon&amp;quot;,&lt;br /&gt; &amp;quot;commonName&amp;quot;: &amp;quot;Amazon RSA 2048 M03&amp;quot;&lt;br /&gt; },&lt;br /&gt; &amp;quot;validFrom&amp;quot;: &amp;quot;Oct 9 00:00:00 2024 GMT&amp;quot;,&lt;br /&gt; &amp;quot;validTo&amp;quot;: &amp;quot;Nov 7 23:59:59 2025 GMT&amp;quot;,&lt;br /&gt; &amp;quot;fingerprint&amp;quot;: &amp;quot;****************************************************&amp;quot;,&lt;br /&gt; &amp;quot;serialNumber&amp;quot;: &amp;quot;*******************************************************************&amp;quot;&lt;br /&gt; }&lt;br /&gt; }&lt;br /&gt; },&lt;br /&gt; &amp;quot;Request Headers&amp;quot;: {&lt;br /&gt; &amp;quot;authorization&amp;quot;: &amp;quot;Basic ************************************/&amp;quot;,&lt;br /&gt; &amp;quot;user-agent&amp;quot;: &amp;quot;PostmanRuntime/7.43.0&amp;quot;,&lt;br /&gt; &amp;quot;accept&amp;quot;: &amp;quot;*/*&amp;quot;,&lt;br /&gt; &amp;quot;cache-control&amp;quot;: &amp;quot;no-cache&amp;quot;,&lt;br /&gt; &amp;quot;postman-token&amp;quot;: &amp;quot;f0843694-4b38-42e7-b136-6460c0a14053&amp;quot;,&lt;br /&gt; &amp;quot;host&amp;quot;: &amp;quot;deloitteuk.appiancloud.com&amp;quot;,&lt;br /&gt; &amp;quot;accept-encoding&amp;quot;: &amp;quot;gzip, deflate, br&amp;quot;,&lt;br /&gt; &amp;quot;connection&amp;quot;: &amp;quot;keep-alive&amp;quot;&lt;br /&gt; },&lt;br /&gt; &amp;quot;Request Body&amp;quot;: &amp;quot;{ value: null }&amp;quot;,&lt;br /&gt; &amp;quot;Response Headers&amp;quot;: {&lt;br /&gt; &amp;quot;date&amp;quot;: &amp;quot;Tue, 21 Jan 2025 06:24:36 GMT&amp;quot;,&lt;br /&gt; &amp;quot;content-length&amp;quot;: &amp;quot;61&amp;quot;,&lt;br /&gt; &amp;quot;connection&amp;quot;: &amp;quot;keep-alive&amp;quot;,&lt;br /&gt; &amp;quot;x-trace-id&amp;quot;: &amp;quot;d7cc7121e3fc79f2a26bbfa005e6fff7&amp;quot;,&lt;br /&gt; &amp;quot;strict-transport-security&amp;quot;: &amp;quot;max-age=31536000; includeSubDomains; preload&amp;quot;,&lt;br /&gt; &amp;quot;referrer-policy&amp;quot;: &amp;quot;strict-origin-when-cross-origin&amp;quot;,&lt;br /&gt; &amp;quot;x-frame-options&amp;quot;: &amp;quot;SAMEORIGIN&amp;quot;,&lt;br /&gt; &amp;quot;content-security-policy-report-only&amp;quot;: &amp;quot;style-src &amp;#39;unsafe-inline&amp;#39; &amp;#39;self&amp;#39; &lt;a href="https://web-assets.appian-cdn.com"&gt;web-assets.appian-cdn.com&lt;/a&gt; &amp;#39;strict-dynamic&amp;#39; &amp;#39;nonce-OThjNjMzODEtN******************************&amp;#39;; child-src &amp;#39;none&amp;#39;; script-src &amp;#39;self&amp;#39; &amp;#39;unsafe-inline&amp;#39; &amp;#39;unsafe-eval&amp;#39; &lt;a href="https://web-assets.appian-cdn.com"&gt;web-assets.appian-cdn.com&lt;/a&gt; &amp;#39;strict-dynamic&amp;#39; &amp;#39;nonce-ZDhlMTY1YzktMDBhNi00ZTMxLWFmZjUtYTNiMWMxZWUzNjg1&amp;#39;; object-src https:; frame-src https:; img-src https:; default-src &amp;#39;self&amp;#39;; font-src &amp;#39;self&amp;#39; https: data:; report-uri /suite/rest/a/logging/latest/csp/report; report-to report;&amp;quot;,&lt;br /&gt; &amp;quot;content-security-policy&amp;quot;: &amp;quot;report-uri /suite/rest/a/logging/latest/csp/report; report-to report;&amp;quot;,&lt;br /&gt; &amp;quot;reporting-endpoints&amp;quot;: &amp;quot;report=\&amp;quot;/suite/rest/a/logging/latest/csp/report\&amp;quot;&amp;quot;,&lt;br /&gt; &amp;quot;x-xss-protection&amp;quot;: &amp;quot;1; mode=block&amp;quot;,&lt;br /&gt; &amp;quot;requested-while-authenticated&amp;quot;: &amp;quot;false&amp;quot;,&lt;br /&gt; &amp;quot;x-robots-tag&amp;quot;: &amp;quot;none&amp;quot;&lt;br /&gt; },&lt;br /&gt; &amp;quot;Response Body&amp;quot;: &amp;quot;Upload Successful: 25222 - Untitled document from web API.txt&amp;quot;&lt;br /&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144150?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2025 08:11:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fc1acb93-5d26-4f75-96a4-15253bd99505</guid><dc:creator>venkatrea696188</dc:creator><description>&lt;p&gt;Need to see the body . Null or empty also gives false for empty array .If your body coming as a empty array it will go for true statement in that if condition&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/18/pastedimage1736323713763v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144142?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 18:26:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:77a738e1-3618-4eaa-bb15-9fff37e85f54</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Can you post the full HTTP request you send to Appian?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144114?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 04:39:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cd9ed484-07c3-4dbb-8ae3-df29e2b5368f</guid><dc:creator>Puru Gope</dc:creator><description>&lt;p&gt;Yes &lt;a href="/members/stefanhelzle0001"&gt;Stefan Helzle&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I did try and the result was same. I don&amp;#39;t see anywhere documented that Appian will create a document by itself and upload it if no document was passed in the body.&lt;/p&gt;
&lt;p&gt;Also, I don&amp;#39;t see where &amp;quot;Untitled document from web API.txt&amp;quot; part is being handled in the webAPI.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/18/pastedimage1736224778542v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/18/pastedimage1736224750674v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144113?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2025 04:35:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f667ea65-74c8-4525-97ce-25158a2f5bde</guid><dc:creator>Puru Gope</dc:creator><description>&lt;p&gt;Yes &lt;a href="/members/stefanhelzle0001"&gt;Stefan Helzle&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I did try and the result was same. However I just don&amp;#39;t see anywhere documented that if we don&amp;#39;t send any document, Appian is going to create a document by itself and upload it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Trying to understand whether it&amp;#39;s a bug or it&amp;#39;s the way it is handled. Even, I don&amp;#39;t see where &amp;quot;Untitled document from web API.txt&amp;quot; is being handled.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/18/pastedimage1736224278167v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/18/pastedimage1736224303916v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144083?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2025 10:45:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5838ae85-64fa-404a-b10c-fa934ce6abd0</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Did you consider to use a!isnullorempty() instead of isnull()? This is the more modern approach and manages more of the edge cases.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144079?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2025 08:52:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:473501f5-e6ec-4eb8-8b62-387bf1322bca</guid><dc:creator>venkatrea696188</dc:creator><description>[quote userid="288631" url="~/discussions/f/integrations/38262/document-upload--webapi/144076"] is not taking the body as empty[/quote]
&lt;p&gt;Empty Array returns false (Documented )&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/24.4/fnc_informational_isnull.html"&gt;https://docs.appian.com/suite/help/24.4/fnc_informational_isnull.html&lt;/a&gt;&amp;nbsp;.&lt;/p&gt;
[quote userid="288631" url="~/discussions/f/integrations/38262/document-upload--webapi/144076"] from where &amp;quot;Untitled document from web API.txt&amp;quot; is being handled?[/quote]
&lt;p&gt;And coming to this it&amp;#39;s taking true in if statement and trying to creating a Document for Empty values&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144076?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2025 08:38:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ca443989-7816-47f3-96df-7ffb398d7354</guid><dc:creator>Puru Gope</dc:creator><description>&lt;p&gt;Thanks &amp;nbsp;,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see any option to see local!success . However, I did fixed it by checking the size of the request.body.&lt;/p&gt;
&lt;p&gt;I am just trying to figure out Appian is not taking the body as empty and from where &amp;quot;Untitled document from web API.txt&amp;quot; is being handled?&lt;/p&gt;
&lt;p&gt;Sharing test-results from Postman&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/18/pastedimage1736152632696v1.png" alt=" " /&gt;&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Document Upload- WebAPI</title><link>https://community.appian.com/thread/144075?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2025 07:55:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6db66510-ecfa-4b3b-b6ac-e7671e3abcd8</guid><dc:creator>venkatrea696188</dc:creator><description>&lt;p&gt;In negative scenario what&amp;#39;s the value of local!success is it really giving you &lt;strong&gt;false&lt;/strong&gt;?? I doubt that Can you check it once, It went for true statement in&lt;strong&gt; if condition&lt;/strong&gt; that means it&amp;#39;s true to start with. So try adding one more condition like checking length of the array etc.,&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/18/pastedimage1736149958245v1.png" /&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>