title: Reading uploaded file as string array
body: <p>I'm uploading a file which is a multi line text document.  I need to extract certain lines out of the document and then store in database as a byte array.<br>
  I've been able to create a string which shows all the line break characters but unsure how to create a string array so i can edit line by line.</p>
  
  <pre><code>  public async Task&lt;string&gt; Upload()
      {
          // get Id of GSM
          string id = HttpContext.Current.Request.Form["id"];
          // get Current logged in user
          var userId = User.Identity.GetUserId();
  
          var provider = new MultipartMemoryStreamProvider();
          var test = await Request.Content.ReadAsMultipartAsync(provider);
  
          // extract file name and file contents
          var fileNameParam = provider.Contents[0].Headers.ContentDisposition.Parameters.FirstOrDefault(p =&gt; p.Name.ToLower() == "filename");
          string fileName = (fileNameParam == null) ? "" : fileNameParam.Value.Trim('"');
  
          //read as byte array
          byte[] file = await provider.Contents[0].ReadAsByteArrayAsync();
          // read as string
          string text = System.Text.Encoding.UTF8.GetString(file);
  
         // Convert to string array???
  
          var result = string.Format("Received '{0}' with length: {1}", fileName, file.Length);
          return text;
  
      }
  </code></pre>