title: How to create new tack with atachments in Jira use Java?
body: <p>I want to create new task with attachments in Jira. So I try:</p>
  
  <pre><code>BasicCredentials creds = new BasicCredentials("username", "password");
  JiraClient jira = new JiraClient("https://url", creds);
      try {
          File file1 = new File("D:\\image1.jpg");
          File file2 = new File("D:\\description.pdf");
          List&lt;File&gt; fileList = new ArrayList&lt;File&gt;();
          fileList.add(file1);
          fileList.add(file2);
  
          Issue newIssue = jira.createIssue("ProjectName", "Task")
                  .field(Field.SUMMARY, "Task with attachments")
                  .field(Field.DESCRIPTION, "Description for task with attachments.")
                  .field(Field.PRIORITY, Field.valueById("2"))
                  .field(Field.ATTACHMENT, fileList)
                  .execute();
      } catch (JiraException e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>But this way is wrong. How to include <code>fileList</code> to Jira task?</p>