title: ByteArray to IFormFile
body: <p>I am developing some REST API with C# and Net Core<br>
  I have a function in my repository which accepts a parameter of type <code>IFormFile</code>.  </p>
  
  <pre><code>public async Task&lt;bool&gt; UploadFile(IFormFile file)
  {
      // do some stuff and save the file to azure storage
  }
  </code></pre>
  
  <p>This function is called by a controller method which pass it the uploaded file </p>
  
  <pre><code>public class FileController : Controller
  {
      public async Task&lt;IActionResult&gt; UploadDoc(IFormFile file
      {
          // Call the repository function to save the file on azure
          var res = await documentRepository.UploadFile(file);
      }
  }
  </code></pre>
  
  <p>Now I have another function that calls an external API which returns a file as a byte array. I'd like to save this byte array using the <code>repository.UploadFile</code> method but I can't cast the byte array object to <code>IFormFile</code>.<br>
  Is it possible?</p>