<?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!fileUploadField</title><link>https://community.appian.com/discussions/f/user-interface/22413/a-fileuploadfield</link><description>I am using a!fileUploadField in my interface and its not showing any error when I am editing in expression Mode but when i change it to designer mode its showing error. Could not display interface. Please check definition and inputs. Interface Definition</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: a!fileUploadField</title><link>https://community.appian.com/thread/88030?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 16:51:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:092d5dbe-d6c3-4ab6-ac1e-728ada9cfe21</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Here&amp;#39;s an alternative version of the code that should be runnable by simply copying and pasting:&lt;br /&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!localVariables(
  local!registratioNo: &amp;quot;1234&amp;quot;,
  local!file: null(),

  a!fileUploadField(
    label: &amp;quot;Upload An Image :&amp;quot;,
    labelPosition: &amp;quot;ABOVE&amp;quot;,
    /*target: cons!YOUR_TEMP_FOLDER,*/
    fileNames: /*fv!files.name:*/ local!registratioNo,
    fileDescriptions: &amp;quot;This is the uploaded file for the vehicle : &amp;quot; &amp;amp; local!registratioNo,
    maxSelections: 1,
    value: local!file,
    saveInto: {
      local!file,
      /*a!save(ri!Vehicle.UploadedFile, save!value)*/
    },
    /*required: if((local!required), true(), false()),*/
    validations: {
      if(
        upper(fv!files.extension) &amp;lt;&amp;gt; &amp;quot;JPG&amp;quot;,
        &amp;quot;File format is not supported &amp;quot;,
        {}
      ),
      if(
        fv!files.size &amp;gt; 100,
        &amp;quot;File size should not be greater than 100 Bytes (note: I lowered this for testing purposes)&amp;quot;,
        {}
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: a!fileUploadField</title><link>https://community.appian.com/thread/88029?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 16:43:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:74154692-1b5c-4967-83a3-a6525cbe1728</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I don&amp;#39;t see any errors myself yet, but I have a recommendation for how to correctly use the validations parameter.&amp;nbsp; The way you have it curently, the validations will only ever work one at a time.&amp;nbsp; In general, you should configure it such that any applicable validations are shown at any given time (such as if the file&amp;#39;s extension is invalid AND it&amp;#39;s too large).&lt;/p&gt;
&lt;p&gt;The key here is that &amp;quot;validations&amp;quot; expects an &lt;em&gt;array&lt;/em&gt; of text - a single value will work fine but an array will work best.&lt;/p&gt;
&lt;p&gt;Oh, I also see your error now: your fileNames parameter is doing something invalid.&amp;nbsp; If you just want to use local!registrationNo for the file name, you would just use that and not invoke &lt;em&gt;fv!files.name&lt;/em&gt; at all.&amp;nbsp; The way you currently have the code setup is not valid and I&amp;#39;m fairly sure it&amp;#39;s the source of your error.&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/13/pastedimage1637080970164v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the overall corrected version:&lt;br /&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!fileUploadField(
  label: &amp;quot;Upload An Image :&amp;quot;,
  labelPosition: &amp;quot;ABOVE&amp;quot;,
  target: cons!MY_FOLDER,
  fileNames: /* fv!files.name:*/ local!registratioNo,
  fileDescriptions: &amp;quot;This is the uploaded file for the vehicle : &amp;quot; &amp;amp; local!registratioNo,
  maxSelections: 1,
  value: local!file,
  saveInto: {
    local!file,
    a!save(ri!Vehicle.UploadedFile, save!value)
  },
  required: if((local!required), true(), false()),
  validations: {
    if(
      upper(fv!files.extension) &amp;lt;&amp;gt; &amp;quot;JPG&amp;quot;,
      &amp;quot;File format is not supported &amp;quot;,
      {}
    ),
    if(
      fv!files.size &amp;gt; 1000000,
      &amp;quot;File size should not be greater than 1 MB&amp;quot;,
      {}
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: a!fileUploadField</title><link>https://community.appian.com/thread/88003?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 09:45:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d6f5ab38-88bf-4dc3-92d5-4232e6d2525a</guid><dc:creator>ajhick</dc:creator><description>&lt;p&gt;Ah! Actually, I was getting the same error. And very weird!&lt;/p&gt;
&lt;p&gt;It can be solved by putting an or() around your size validation as the fv!files property is an array even though you have a max selection of 1.&lt;/p&gt;
&lt;p&gt;Technically your check on the file extension should also use the or() although being a string it seems to handle it.&lt;/p&gt;
&lt;p&gt;Very weird though.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(
  or(fv!files.extension &amp;lt;&amp;gt; &amp;quot;JPG&amp;quot;),
  &amp;quot;File format is not supported &amp;quot;,
  if(
    or(fv!files.size &amp;gt; 1000000),
    &amp;quot;File size should not be greater than 1 MB&amp;quot;,
    {}
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: a!fileUploadField</title><link>https://community.appian.com/thread/87998?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 07:38:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:bfe06f75-2968-4e63-ad88-51df9c6f380f</guid><dc:creator>sivasuryap0002</dc:creator><description>&lt;p&gt;Yes,&lt;br /&gt;Could please&amp;nbsp;tell me what are the changes you made and why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: a!fileUploadField</title><link>https://community.appian.com/thread/87995?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 07:29:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:338ad0d4-fc4e-4032-aecd-e155efbb5afc</guid><dc:creator>ajhick</dc:creator><description>&lt;p&gt;Are you still having this issue? I copied your code and changed very minimal things and it&amp;#39;s working for me so I&amp;#39;m stumped &lt;span class="emoticon" data-url="https://community.appian.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>