예제 #1
0
        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());
        }