In my 1.1 app I used this method when saving a IFormFile:
foreach (IFormFile source in files) { string navn = ContentDispositionHeaderValue.Parse(source.ContentDisposition).FileName.Trim('"'); var filename = this.EnsureCorrectFilename(navn); using (FileStream output = System.IO.File.Create(this.GetPathAndFilename(filename))) await source.CopyToAsync(output); }
It worked perfectly untill I upgraded my app to 2.0. Now the Trim method don't take any arguments. Even If I just use Trim().ToString(); It can't convert to string properly.
What is going on here?