title: How to send selected file list when submit button click in AngularJs
body: <p>I am using <a href="https://github.com/danialfarid/ng-file-upload" rel="nofollow">ng-file-upload</a> to send files to server.ng-file-upload worked perfectly with upload file one by one.I am using latest chrome browser.</p>
  
  <p><strong>Sample code snippet</strong></p>
  
  <p><a href="http://jsfiddle.net/2vq88rfs/358/" rel="nofollow">jsfiddle</a></p>
  
  <p>in there files are uploaded to the server when files are selected in the file input.But what i want is that files (selected file array) should be uploaded only to the server when submit button  is clicked along with other form data. </p>
  
  <p><strong>Jersey REST service</strong></p>
  
  <pre><code>    @POST
      @Path("/manual")
      @Consumes(MediaType.MULTIPART_FORM_DATA)
      @Produces(MediaType.APPLICATION_JSON)
      public boolean insertResults(@FormDataParam("file") InputStream uploadedInputStream,@FormDataParam("file") FormDataContentDisposition fileDetail,@FormDataParam("username") String username) throws IOException {
  
          System.out.println(username);
  
          StringWriter writer = new StringWriter();
          IOUtils.copy(uploadedInputStream, writer,"UTF-8");
          String theString = writer.toString();
          System.out.println(theString);
  
              return Boolean.TRUE;
  
  }
  </code></pre>
  
  <p>I am new to AngularJs stuff please help me to overcome this problem.</p>