title: How do I process a file from a memory stream?
body: <p>I am posting one or more files from my Vue.js frontend. It's being done as such:</p>
  
  <pre><code>&lt;form enctype="multipart/form-data" novalidate v-if="isInitial || isSaving"&gt;
      &lt;div class="dropbox"&gt;
          &lt;input type="file" multiple :name="uploadFieldName" :disabled="isSaving" @change="filesChange($event.target.name, $event.target.files); fileCount = $event.target.files.length" accept=".json" class="input-file"&gt;
          &lt;p v-if="isInitial"&gt;
              Drag files here to begin &lt;br&gt; or click to browse
          &lt;/p&gt;
          &lt;p v-if="isSaving"&gt;
              Uploading {{ fileCount }} files...
          &lt;/p&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I then post it via this method:</p>
  
  <pre><code>function upload(formData) {
      const url = `${BASE_URL}/api/upload`;
      return axios.post(url, formData, {
          headers: {
              'Content-Type': 'multipart/form-data'
            }
      })
  }
  </code></pre>
  
  <p>Which seems to do the job.</p>
  
  <p>Following Microsoft's own guide, I have created the following endpoint:</p>
  
  <pre><code>namespace WebApplication6.Controllers
  {
      public class UploadController : Controller
      {
          [HttpPost]
          [Route("/api/upload")]
          public async Task&lt;IActionResult&gt; UploadFiles(List&lt;IFormFile&gt; files)
          {
              long size = files.Sum(f =&gt; f.Length);
  
              // full path to file in temp location
              var filePath = Path.GetTempFileName();
  
              foreach (var formFile in files)
              {
                  if (formFile.Length &gt; 0)
                  {
                      using (var stream = new FileStream(filePath, FileMode.Create))
                      {
                          await formFile.CopyToAsync(stream);
                      }
                  }
              }
  
              // process uploaded files &lt;-- What does this entail? How do I access the stream?
  
              return Ok(new { count = files.Count, size, filePath });
          }
      }
  }
  </code></pre>
  
  <p>I am somewhat new to C# coming from Java: What does the <a href="https://docs.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads?view=aspnetcore-2.1" rel="nofollow noreferrer">Microsoft docs found here</a> mean when they say "process uploaded files"? </p>
  
  <p>How do I access them from the memory stream? Why is the comment outside the for loop - if I had to do stuff with the files, it should be on it - or not?</p>