<?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>While calling &amp;#39;Document Upload WEB API&amp;#39; need to restrict specific file extension.</title><link>https://community.appian.com/discussions/f/integrations/22594/while-calling-document-upload-web-api-need-to-restrict-specific-file-extension</link><description>Problem statement: I have a requirement wherein we receive file in Appian from a third party system. For security reasons we want to restrict only few file extension. 
 
 I have created a WEB API using a &amp;#39; Document Upload&amp;#39; Template , so that e xternal</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: While calling 'Document Upload WEB API' need to restrict specific file extension.</title><link>https://community.appian.com/thread/88664?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 16:19:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9b3e2588-6dc0-4bb8-8569-d931200e3904</guid><dc:creator>udhay kumar</dc:creator><description>&lt;p&gt; There is no way to restrict it as of now &amp;nbsp;(still we can show validation error as a response) . Appian converts binary file request to appian document immediately when the external system hits Api . One solution for this is you can create a scheduler to delete unnesasary documents &amp;nbsp;which will run daily or weekly &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: While calling 'Document Upload WEB API' need to restrict specific file extension.</title><link>https://community.appian.com/thread/88328?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 08:18:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9e031c57-af33-4fb1-86b4-68b24f75e4fe</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;A file by itself is no security threat. AFAIK this kind of restriction is not supported. My clients typically put some kind of API management in from of Appian in which we implement this kind of restrictions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: While calling 'Document Upload WEB API' need to restrict specific file extension.</title><link>https://community.appian.com/thread/88327?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 08:10:04 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3f40e7b1-adc8-4ee9-a1ee-9292a7d4fb2d</guid><dc:creator>diptis829231</dc:creator><description>&lt;p&gt;&lt;a class="internal-link view-user-profile" href="/members/stefanh0002"&gt;Stefan Helzle&lt;/a&gt;&amp;nbsp;Main concern is that there exists&amp;nbsp;vulnerability, the API is vulnerable to unrestricted file upload. The API allows to upload file and even if someone sends .exe executable file , then also WEBAPI which created at Appian allows the document to be stored in target folder. Can we restrict this before hand??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: While calling 'Document Upload WEB API' need to restrict specific file extension.</title><link>https://community.appian.com/thread/88323?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 07:45:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:05c1bc6c-fac7-4528-b54d-52cf8cf33525</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The file itself is uploaded and stored in the target folder before the API code is executed. I think this is what you are seeing.&lt;/p&gt;
&lt;p&gt;Why not just start a process which checks the extension and deletes the file if it is the wrong one. If you enable some chaining, you can return values from the process to the API and return appropriate messages.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>