Post files from ASP.NET Core web api to another ASP.NET Core web api : <p>We are building a web application that consist of an Angular2 frontend, a ASP.NET Core web api public backend, and a ASP.NET Core web api private backend.</p>

<p>Uploading files from Angular2 to the public backend works. But we would prefer to post them forward to the private backend.</p>

<p>Current working code</p>

<pre><code>[HttpPost]
public StatusCodeResult Post(IFormFile file)
{
  ...
}
</code></pre>

<p>From there I can save the file to disk using file.CopyTo(fileStream);</p>

<p>However, I want to re-send that file, or those files, or, ideally, the whole request to my second web api core.</p>

<p>I am not sure how to achieve this with the HttpClient class of asp.net core.</p>

<p>I've tried all kinds of things such as</p>

<pre><code>StreamContent ss = new StreamContent(HttpContext.Request.Body);
var result = client.PostAsync("api/Values", ss).Result;
</code></pre>

<p>But my second backend gets an empty IFormFile.</p>

<p>I have a feeling it is possible to send the file(s) as a stream and reconstruct them on the other side, but can't get it to work.</p>

<p>The solution must use two web api core.</p>
