title: how to show download progress on file download?
body: <p>I have an api to download file. It is able to download file but showing only after download completes. there is no download progress.
  I want when user hit that url it will show download progress in chrome, currently it is showing after completion.
  I am using spring boot.</p>
  <pre><code>public responseEntity&lt;Resource&gt;getFile(String fileName){
      byte[] data=null;
      File file=new File(fileName);
      InputStream inputStream=new FileInputStream(file);
      data=IOUtils.toByteArray(inputStream);
      ByteArrayResource fileToDownload = new ByteArrayResource(data);
      return ResponseEntity.ok()
                  .contentType(MediaType.parseMediaType(&quot;application/octet-stream&quot;))
                  .header(&quot;Content-Disposition&quot;, &quot;filename=&quot; + fileName)
                  .body(fileToDownload);
  }
  </code></pre>