I am trying to upload files using aspnet core using ajax request . In previous versions of .net i used to handle this using
foreach (string fileName in Re
What about this merge from two good solutions I came around :
var myBytes = await GetByteArrayFromImageAsync(Request.Form.Files[0]); private async Task GetByteArrayFromImageAsync(IFormFile file) { using (var target = new MemoryStream()) { await file.CopyToAsync(target); return target.ToArray(); } }