title: Download file from MVC 5 to Angular 2
body: <p>I have experience in C# backend and ASP.Net MVC. Now I am making my first attempt on Angular 2. It takes time but I like most of it. Now I am stuck on a simple file download.</p>
  
  <p>I have read all examples that i found here on Stackoverflow, but I still don't get my example to work.</p>
  
  <p>On server side I have this C# code:</p>
  
  <pre><code>    public ActionResult DownloadPicture(long id)
      {
          var bytes = System.IO.File.ReadAllBytes("images\dummy.jpg");
          return GetAttachement(bytes, "DummyFile.jpg");
      }
  
      private ActionResult GetAttachement(byte[] bytes, string fileName)
      {
          var contentType = MimeMapping.GetMimeMapping(fileName);
          var contentDisposition = new System.Net.Mime.ContentDisposition
          {
              FileName = fileName,
              Inline = true
          };
          Response.AppendHeader("Content-Disposition", contentDisposition.ToString());
          return File(bytes, contentType);
      }
  </code></pre>
  
  <p>On client side I have this Typescript code:</p>
  
  <pre><code>public pictureDownload(id: number): void {
      let options = new RequestOptions({ search: new URLSearchParams("id=" + id) });
      this.http.get(this.urlPictureDownload, options).subscribe((data: any) =&gt; {
                  // var blob = new Blob([data._body], { type: "image/jpeg" });
                  // var url = window.URL.createObjectURL(blob);
                  // window.open(url);
         });
   }
  </code></pre>
  
  <p>The request is coming in to server side. The array is downloaded. I guess my problem lies on client side. Can anyone help me out?</p>