title: Single file upload in JIRA
body: <p>I am trying to upload <strong>a single</strong> file on JIRA for my plugin. Default JIRA upload behaviour is uploading the files via Ajax and converting them to checkboxes, thus enabling multiple file to be "uploaded" via one form <code>type="file"</code> element (see the picture). </p>
  
  <p><img src="https://i.stack.imgur.com/mm4m7.png" alt="attached files"></p>
  
  <p>To disable inline attaching, class <code>ignore-inline-attach</code> can be specified:</p>
  
  <pre><code>&lt;form action="TestBrowse.jspa" id="upload-form" method="post" enctype="multipart/form-data"&gt;
          &lt;input type="hidden" name="id" value="10000"/&gt;
          &lt;input type="file" name="uploadFile" class="ignore-inline-attach"/&gt;
          &lt;input type="submit"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>But then, when I try to get the <code>MultipartRequestWrapper</code> in the servlet / action, I get nothing (this should be the way to go according to various sources, like <a href="https://answers.atlassian.com/questions/56249/how-to-get-multipartrequestwrapper-object-in-jira" rel="noreferrer">here</a>):</p>
  
  <pre><code>@Override
  public String doExecute() throws Exception {
    MultiPartRequestWrapper requestWrapper = ServletActionContext.getMultiPartRequest();
    if (requestWrapper == null)
      log.error("Why am I not getting a multipart wrapper?")
    else  {
      ...do something...
    }  
    return returnCompleteWithInlineRedirect("/browse/" + getIssueObject().getKey());
  }
  </code></pre>
  
  <p>Also, the enctype of the request seems to be <code>application/x-www-form-urlencoded; charset=UTF-8</code>, although <code>multipart/form-data</code> is clearly specified in the form template. Any ideas where I am making a mistake or some workaround?</p>