public async Task <IActionResult> Create([FromForm] UploadClass data) { IEnumerable <IFormFile> files = data.myFiles; foreach (var file in files) { using (MemoryStream ms = new MemoryStream()) { await file.CopyToAsync(ms); byte[] bytes = ms.ToArray(); LecturerService.CreateFromExcel(bytes); } } return(Ok()); }