title: Change Content-Disposition to open all image file files in a new tab
body: <p>Here's the logic for downloading the file.</p>
  
  <p>It automatically downloads the file, whether it's a .jpg, .pdf, .zip or whatever, I would like it to only open in a new tab if it's an image file(jpg, png, etc.) and then everything else prompts for a download.</p>
  
  <p>I feel like I'm missing something when it comes to solving this. :/</p>
  
  <pre><code>public void DownloadArchivedFiles(ArchiveType type, Object id, String fileName)
      {
          Response.ContentType = "application/zip";
          Response.AddHeader("content-disposition", "filename=" + fileName);
  
          String path = Server.MapPath(String.Format("~/{0}Files/{1}", type, id));
          var fmFiles = new string[0];
          var files=new string[0];
          if(type==ArchiveType.Issue)
          { 
              fmFiles = _files.GetIssueFiles(new Guid(id.ToString())).Select(x =&gt; Server.MapPath("~" + x.FilePath)).ToArray();
          }else if(type==ArchiveType.Task)
          {
              fmFiles = _files.GetTaskFiles(int.Parse(id.ToString())).Select(x =&gt; Server.MapPath("~" + x.FilePath)).ToArray();
          }
          if (!System.IO.Directory.Exists(path) &amp;&amp; !fmFiles.Any()) return;
  
          //String[] files = System.IO.Directory.GetFiles(Server.MapPath(String.Format("~/{0}Files/{1}", type, id)));
          try
          {
              files = System.IO.Directory.GetFiles(Server.MapPath(String.Format("~/{0}Files/{1}", type, id)));
          }
          catch (Exception)
          {
              ;
          }
  
          using (ZipFile zip = new ZipFile())
          {
              zip.AddFiles(files, "/");
              if(fmFiles.Any())
              zip.AddFiles(fmFiles,"/");
              zip.Save(Response.OutputStream);
          }
          HttpContext.Response.End();
      }
  </code></pre>