<?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>A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/discussions/f/general/5192/a-way-to-validate-an-uploaded-file-before-submitting</link><description>I have discovered something and would like to share it with the community, while at the same time would like to know if this is &amp;quot;safe&amp;quot; to be used, or whether the slightest code change in Appian might cause it to misbehave. A way of validating the uploaded</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/146167?ContentTypeID=1</link><pubDate>Tue, 11 Mar 2025 07:32:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5a1e6027-a70c-4693-97d0-2a248cfed3eb</guid><dc:creator>Digvijay Shinde</dc:creator><description>&lt;p&gt;Do we have any solution&amp;nbsp;to this thread, As I am looking for same in Version&amp;nbsp;&lt;strong class="StrongText---richtext_strong"&gt;24.3&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/66562?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 07:50:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fa2ee65b-0b0b-48a9-90e9-9dd17de1c6dc</guid><dc:creator>sayalip</dc:creator><description>&lt;p&gt;Well, I found a solution to my problem!&lt;/p&gt;
&lt;p&gt;I replaced the new fileUpload version with 17.1 version and it worked just fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/66551?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 04:56:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f2b0abf5-2516-4ac1-b319-e7d55ce0b4aa</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The original (unsupported) functionality as discussed earlier in this thread still works as far as I know, though several versions ago the internal properties were changed around slightly and now need to be addressed differently.&lt;/p&gt;
&lt;p&gt;If Appian wishes us to no longer need to use this unsupported functionality, all they would need to do is allow the fv!file properties to be accessed inside the saveInto parameter, allowing designers to capture name, extension, and size properties as needed into local variables and/or rule input variables, but for some reason this was not included when they implemented the same functionality within the validations parameter etc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/66550?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 04:48:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3168c01b-5af0-424c-bf0a-f7874e5dae33</guid><dc:creator>sayalip</dc:creator><description>&lt;p&gt;Hi Peter,&lt;/p&gt;
&lt;p&gt;I am aware about the new version of file upload field where we can access names, extensions, etc via fv!file variable but these can be accessed only inside fileNames,&amp;nbsp;&lt;strong class="StrongText---richtext_strong"&gt;fileDescriptions and&amp;nbsp;validations.&amp;nbsp;&lt;span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong class="StrongText---richtext_strong"&gt;&lt;span&gt;My requirement is to capture the uploaded file&amp;#39;s name; once the user uploads a file, and simultaneously display that name in an adjacent textfield. How do I achieve this? Let me know if you know of any workaround.&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/66539?ContentTypeID=1</link><pubDate>Mon, 13 May 2019 13:38:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7dc8dd5f-f83c-4eac-a08c-21af9e0ad618</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Since it looks like someone recently asked this question again, the behavior listed in this discussion thread is not supported. In 17.2, a new version of the File Upload component was released where you can validate on file size, extension, and name using fv!files in the validations field. Please see the documentation for the File Upload field for more information and several examples of validations:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/latest/File_Upload_Component.html"&gt;https://docs.appian.com/suite/help/latest/File_Upload_Component.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/66534?ContentTypeID=1</link><pubDate>Mon, 13 May 2019 10:44:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:76e56aca-4813-404b-a231-d09c52109a50</guid><dc:creator>sayalip</dc:creator><description>&lt;p&gt;Hi Mike, this .contents.name solution does not work in 18.1. Has Appian changed these values? Or if you could tell where to find these properties.&lt;/p&gt;
&lt;p&gt;My requirement is to capture the uploaded file&amp;#39;s name; once the user uploads a file, and simultaneously display that name in an adjacent textfield. How do I achieve this?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/45037?ContentTypeID=1</link><pubDate>Tue, 25 Apr 2017 10:50:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e685ed37-b663-40af-8524-e4e62717703c</guid><dc:creator>pallavim</dc:creator><description>It worked in 17.1 version as well. I wonder where did you get to know this .uploadedDocumentName property?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/43742?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2017 10:41:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2b4373ca-28e0-47c1-8494-e08ab1c887d2</guid><dc:creator>rachel.rater1</dc:creator><description>Thanks for the comments. Good feedback as we design the new capability.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/43741?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2017 10:39:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fee8629d-dfac-41a4-b81f-396a557e1f4d</guid><dc:creator>Chris</dc:creator><description>I&amp;#39;d like to chime in and add that we would also greatly appreciate a bump in priority on this one.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/43738?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2017 10:26:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1c8191fb-309d-4001-ae24-92322a48c684</guid><dc:creator>Mike Schmitt</dc:creator><description>@Rachel - I agree, which is why I&amp;#39;ve strongly suggested that anyone who uses this workaround solution encapsulate it into an external expression rule for easy updating if the functionality changes or becomes nonfunctional in the future.  And of course the only reason many of us have used this workaround is because it&amp;#39;s so badly needed.&lt;br /&gt;&lt;br /&gt;Accordingly, I would request that when new official functionality is developed for this, at least a slight amount of consideration is given to making it flexible enough that it can be included in expression rules, such as a new system function that is allowed read certain properties of a freshly uploaded file (like a!fileUploadField() can).  That way, anyone who&amp;#39;s implemented what I&amp;#39;ve recommended here could easily change it over to use the new official rule, and not need to chase down and manually change all the places we have a!fileUploadField used on a form.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/43426?ContentTypeID=1</link><pubDate>Wed, 22 Feb 2017 03:24:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d5149d7b-2a81-4522-a7ba-2a072a65ae32</guid><dc:creator>rachel.rater1</dc:creator><description>Please note that this is not supported functionality and not guaranteed to work. It&amp;#39;s on the backlog to address this use case in a supported way and provide that functionality in a future release.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/43299?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2017 16:36:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:77306450-fb46-40d9-b920-39c8fb31c275</guid><dc:creator>Chris</dc:creator><description>I&amp;#39;m filing this for our 17.1 upgrade, definitely will be useful - thanks!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/43298?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2017 16:32:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4d2f517d-f5e6-44be-b1ea-2191d4707bb6</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Attaching an updated version - this one will better handle irregularly-named files such as &amp;quot;noExtension&amp;quot; or &amp;quot;.properties&amp;quot; - both versions of the evaluation will now work for both of these scenarios (i.e. files with no extension or *only* an extension).&lt;br /&gt;&lt;br /&gt;[To anyone subscribed to this thread, sorry for the barrage of emails this is probably causing - i hope some are finding this useful at least.]&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-filesystemfile/__key/communityserver-discussions-components-files/11/3364.New-File-Upload-Properties-Rule.sail"&gt;New File Upload Properties Rule.sail&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/43293?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2017 15:23:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9087371d-2d5f-4159-a4ee-d708d6001698</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Everyone interested in this functionality, please reference the attached expression rule which should now handle the new 17.1 file upload field properties at the same time as the old rendering style.&lt;br /&gt;&lt;br /&gt;This rule accepts a rule input of type Document (ri!document), and will return a data dictionary consisting of 4 properties: &amp;quot;fullName&amp;quot; (name.ext), &amp;quot;name&amp;quot; (just name without extension, if any), &amp;quot;ext&amp;quot; (just extension, if any), and &amp;quot;size&amp;quot; (text-based abbreviated filesize - i.e. &amp;quot;44 kb&amp;quot;, &amp;quot;2 mb&amp;quot;, etc). The four properties are returned blank if no input or invalid input is passed, to ensure it&amp;#39;s safe to use even when no file is uploaded yet.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve tested this in 17.1 (in an actual task form) as well as in interface designer in 17.1 and 16.3, and it seems to work as desired, though any feedback is welcomed.&lt;/p&gt;
&lt;p&gt;[removed download - newer version in &lt;a href="/discussions/f/general/5192/a-way-to-validate-an-uploaded-file-before-submitting/43298#43298"&gt;subsequent comment&lt;/a&gt;]&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/43290?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2017 15:08:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:527fa040-b3e0-4fc3-b702-2257fbe2acdb</guid><dc:creator>Mike Schmitt</dc:creator><description>Good catch Josh - it looks like in the new interface, they got rid of the old field &amp;quot;uploadedDocumentName&amp;quot; and the new equivalent is &amp;quot;.name&amp;quot; and &amp;quot;.extension&amp;quot; wrapped inside a new dot property &amp;quot;.container&amp;quot; as you noted.&lt;br /&gt;&lt;br /&gt;(I&amp;#39;ll point out here that if anyone followed my previous advice and encapsulated all functionality pertaining to uploaded doc name validation in custom expression rules, i&amp;#39;m guessing this will probably be an easy fix ;-))&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/43254?ContentTypeID=1</link><pubDate>Thu, 16 Feb 2017 19:11:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c270ce5d-90b2-4725-9a36-06048d13d409</guid><dc:creator>Josh</dc:creator><description>So after doing some more digging it looks like there is an issue with the file upload field on 17.1 &amp;quot;a!fileuploadField()&amp;quot; is different in the interface designer vs tempo. In the interface designer you can capture the uploadedDocumentName in the interface designer, but in Tempo you actually need to do somethign like .contents.extension = &amp;quot;pdf&amp;quot; or similar.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/43187?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2017 20:23:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ec64e937-4e9b-4a68-a2e4-21d219352643</guid><dc:creator>Josh</dc:creator><description>@mschmitt 17.1 did remove a ton of non-standard stuff from SAIL. I bet it was one of those non-standard hacks rather than this file upload workaround!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/42770?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2017 18:23:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bf8c760f-8de4-4b45-b0af-d6ebeb77777a</guid><dc:creator>Mike Schmitt</dc:creator><description>Actually, I have access to a 17.1 server and it looks to still be working the same way for me.  @ajinkyab277, please post a screenshot of your code where it isn&amp;#39;t working as maybe you&amp;#39;re doing something non-standard.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/42767?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2017 18:00:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ea0460a4-db15-4f55-a261-0ba8f77bc1a0</guid><dc:creator>Mike Schmitt</dc:creator><description>(sorry, a!fileUploadField*)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/42766?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2017 17:44:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0c1ab03d-85f4-4d41-b305-0dbf408487ae</guid><dc:creator>Mike Schmitt</dc:creator><description>@ajinkyab277, this should be simple to debug - all you need to do is view the properties of the a!documentUploadField component when viewed as text output.&lt;br /&gt;&lt;br /&gt;i.e. an interface including a file upload field saving its upload value into a local variable, followed by this:&lt;br /&gt;a!paragraphField(&lt;br /&gt;  value: a!documentUploadField(value: local!uploadedFile)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;If someone could try this and post a screenshot, that would be helpful.&lt;br /&gt;&lt;br /&gt;My guess is that the background property name has been changed - this is a good example of why I suggest doing this functionality only within an encapsulated external rule and not hard-coded into forms.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/42765?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2017 17:40:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e0b8e6d7-6744-4c45-ab3e-a81cc7f6309a</guid><dc:creator>andrewl657</dc:creator><description>ajinkyab277, did you find information as to why this stopped in 17.1?  We are trying to implement in 16.3 but hesitant if not operational in 17.1 or later.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/42593?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2017 08:47:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:97d23458-b16f-490c-aadf-158db7f2d827</guid><dc:creator>ajinkyab277</dc:creator><description>This has stopped working in Appian 17.1  I am getting below error Invalid index: Cannot index property &amp;#39;uploadedDocumentName&amp;#39; of type Text into type FieldLayout.&lt;br /&gt;&lt;br /&gt;It was working till Appian 16.3&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/39683?ContentTypeID=1</link><pubDate>Fri, 25 Nov 2016 15:35:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:788b4f0b-93f6-47b5-9346-630ef2c21553</guid><dc:creator>nikolaosm</dc:creator><description>BTW. The previous post I made about news in tempo allowing upload of .bat and .exe files was a penetration test finding. I think at some point Appian should do something to make all this confgurable&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/39676?ContentTypeID=1</link><pubDate>Fri, 25 Nov 2016 10:14:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6ec378d3-f76c-4d79-97bc-e321af16f37e</guid><dc:creator>shivakanthr</dc:creator><description>Good Approach !!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A Way to Validate an Uploaded File Before Submitting</title><link>https://community.appian.com/thread/34748?ContentTypeID=1</link><pubDate>Wed, 12 Oct 2016 17:12:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c276c90b-4828-489b-a9c5-908207d65487</guid><dc:creator>neelimaj790</dc:creator><description>@adela, Good one! I used below expression in rule "ucValidateImageByImageNameString"&lt;br /&gt;&lt;br /&gt;with(&lt;br /&gt;  local!Extension: if(isnull(ri!fileName),"",reverse(split(ri!fileName,"."))[1]),&lt;br /&gt;  if(&lt;br /&gt;    or(&lt;br /&gt;      local!Extension = "jpg",&lt;br /&gt;      local!Extension = "jpeg",&lt;br /&gt;      local!Extension = "png",&lt;br /&gt;      local!Extension = "tiff",&lt;br /&gt;      local!Extension = "gif",&lt;br /&gt;      local!Extension = "bmp"&lt;br /&gt;    ),&lt;br /&gt;    true,&lt;br /&gt;    false&lt;br /&gt;  )&lt;br /&gt;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>