title: FileUpload isFormField() returning true when submitting file
body: <p>I am using <code>Apache-Commons FileUpload library</code> to upload files to a server. It was working fine, but suddenly when I am submitting the file, <code>FileItem.isFormField()</code> is returning true for some reason or another. This is the code I have</p>
  
  <p><strong>FileUpload.java</strong> servlet</p>
  
  <pre><code>if (ServletFileUpload.isMultipartContent(request)) 
  {
      List&lt;FileItem&gt; items = new ServletFileUpload(
                     new DiskFileItemFactory()).parseRequest(request);
  
      for (FileItem item : items)
      {
          // if item is a file type and not a form field 
          if (!item.isFormField())
          {
                  // UPLOAD FILE
          }
      }
  }
  </code></pre>
  
  <p><strong>ticketform.jsp</strong></p>
  
  <pre><code>&lt;form action="upload" enctype="multipart/form-data" method=post&gt;
      &lt;button type="button" id="clip-btn" class="attach-tool-tip" &gt;
          &lt;img src="images/attachment.png" id="attach-img" width="25px"/&gt;
      &lt;/button&gt;
  
      &lt;input id="attach-btn" type="file" style="display:none"/&gt;
      &lt;input id="submit-form" name="upload" type="submit" style="display:none"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>ticketform.js</strong></p>
  
  <pre><code>// trigger file chooser click when clicking paper clip icon
  $('#clip-btn').click(function()
  {
      $('#attach-btn').trigger('click');
  });
  
  // trigger file submit on filename change in input type='file'
  $('#attach-btn').change(function()
  {
      $('#submit-form').trigger('click');
  });
  </code></pre>
  
  <p>When I am seeing the contents of '<code>attach-btn</code>' i.e. the input file type, the file is there with it's correct name, last modified, size etc.. so it is submitting with the good file. Can there be any external reason why when the request is parsed, it's counting as a form field?</p>