title: Unable to attach file to issue in jira via rest api Java
body: <p>I want to attach multiple files to issue. I'm able to create issue successfully however i am facing problem in attaching documents after creating issue. I have referred to this link <a href="https://community.atlassian.com/t5/Adaptavist-questions/SOLVED-attach-a-file-using-REST-from-scriptrunner/qaq-p/1107562" rel="nofollow noreferrer">SOLVED: attach a file using REST from scriptrunner</a>
   I am getting 404 error even though issue exists and also user has all the permissions.</p>
  
  <pre><code>File fileToUpload = new File("D:\\dummy.txt");
  InputStream in = null;
  try {
      in = new FileInputStream(fileToUpload);
  } catch (FileNotFoundException e) {
      e.printStackTrace();
  }
  
  HttpResponse &lt; String &gt; response3 = Unirest
      .post("https://.../rest/api/2/issue/test-85/attachments")
      .basicAuth(username, password).field("file", in , "dummy.txt")
      .asString();
  System.out.println(response3.getStatus());
  </code></pre>
  
  <p>here <strong>test-85</strong> is a issueKey value. 
  And i am using <strong>open-unirest-java-3.3.06.jar</strong>.  Is the way i am attaching documents is correct?</p>