title: Response header Content-Disposition not doing anything
body: <p>I am trying to retrieve a file from my server (which is using ASP.NET Core MVC) and display it in the browser. After looking through many threads on here and other sites, the same solution seems to be suggested every time; which is to use Content-Disposition inline in the response header. I have my code as follows:</p>
  
  <pre><code>IFileInfo file = _fileProvider.GetFileInfo(filename);
  Response.Headers.Add("Content-Disposition", $"inline; {file.Name}");
  return File(file.CreateReadStream(), "application/pdf", file.Name);
  </code></pre>
  
  <p>While this seems to be the correct code based on other threads I've seen, the Content-Disposition header does absolutely nothing in my code. Whether I have the header, remove it, or make it something else (i.e. attachment), it downloads and saves the file but does not display it unless I manually open the file.</p>
  
  <p>Does anyone know what I'm missing here? </p>