title: How to pass on a FileStreamResult from another controller
body: <p>I have an ASP.Net Core controller that returns a FileStreamResult:</p>
  <pre><code>[HttpGet(&quot;{imageCode}&quot;)]
  public async Task&lt;IActionResult&gt; ShowMeYourBytes(string imageCode)
  {
      var result = await _imageService.GetMyImage(imageCode);
      return new FileStreamResult(result.Stream, result.MimeType);
  }
  </code></pre>
  <p>Now, in another ASP.Net Core controller, running somewhere else, I want to do this:</p>
  <pre><code>[HttpGet(&quot;{imageCode}&quot;)]
  public async Task&lt;IActionResult&gt; ByteSizedImage(string imageCode)
  {
      var request = new HttpRequestMessage(HttpMethod.Get, $&quot;urlToServer/api/{imageCode}&quot;);
      var httpClient = new HttpClient();
      var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
  
      return new FileStreamResult(response.Content.ReadAsStream(cancellationToken), response.Content.Headers.GetValues(&quot;Content-Type&quot;).First())
  }
  </code></pre>
  <p>I expected this to work:</p>
  <pre><code>&lt;img src=&quot;blabla.com/ByteSizedImage/mycoolimage&quot; /&gt; 
  </code></pre>
  <p>But this doesn't work, the image refuses to load. Looking at the <code>response</code> in <code>ByteSizedImage</code> in the debugger, I see the response data, so I'm receiving it. So the error is in how I'm passing it on from the <code>ByteSizedImage</code> method. How do I get ByteSizedImage to act as a &quot;proxy&quot; for my FileStreamResult?</p>