public async Task Post()
        {
            IFormFileCollection files = Request.Form.Files;

            if (files.Count > 0)
            {
                foreach (IFormFile file in files)
                {
                    string fileExtension =
                        System.IO.Path.GetExtension(file.FileName);
                    if (fileExtension == ".xls" || fileExtension == ".xlsx")
                    {
                        await _transferExcelService.SaveAsync(file);
                    }
                    else
                    {
                        throw new BadReadException("FileExtension not .xls or .xlsx");
                    }
                }
            }
            else
            {
                Logger.Info("Files Not Found");
                throw new BadReadException("Files Not Found");
            }
        }
 public async Task Upload()
 {
     using (System.IO.Stream file = System.IO.File.OpenRead(@"D:\проекты\тестовые задания\TransferData\TransferData\TransferData.Tests\bin\Debug\netcoreapp3.1\test.xlsx"))
     {
         ITransferExcelService transferExcelService = _serviceProvider.GetService <ITransferExcelService>();
         await transferExcelService.SaveAsync(file, "test");
     }
 }