title: how to get path file selected in .netcore web api(IFromFile)
body: <p>my field is </p>
  
  <pre><code>    public IFormFileCollection FileNames { get; set; }
  </code></pre>
  
  <p>i get multiple file from postman (form-data) and post
  in api-controller i get fields of send with postman</p>
  
  <p><a href="https://i.stack.imgur.com/UVSZv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UVSZv.jpg" alt="enter image description here"></a></p>
  
  <p>my problem here,i need to path of files, how i can get path of FromFile?</p>
  
  <p>updated code :</p>
  
  <pre><code>    using (var fileStream = new FileStream(fileName.FileName, FileMode.Create,FileAccess.Write))
                      {
                          await fileName.CopyToAsync(fileStream);
                          fileStream.Dispose();
                          var request = MyOperationOnFile(fileStream.Name);
                           ...
                      }
  </code></pre>
  
  <p>get this exception for second file(first file is ok):</p>
  
  <pre><code>"Cannot access a disposed object.\r\nObject name: 'FileBufferingReadStream'."
  </code></pre>
  
  <p>if dont use .dispose() get this exception for first file :</p>
  
  <pre><code>Failed to send: Microsoft.AspNetCore.Http.FormFile, with error:The process cannot access the file 'porjectLocation\file' because it is being used by another process
  </code></pre>