示例#1
0
 public async Task AddRecord(ActionRecord record)
 {
     using (var stream = File.OpenRead(record.LocalFilePath))
     {
         await _facade.Create(BuildFileModel(stream, record.FileName));
     }
 }
        public async Task <ActionResult> Post([FromForm] FileDTO file)
        {
            using (var stream = file.FormFile.OpenReadStream())
            {
                await _facade.Create(FormFileModel(file, stream));
            }

            return(StatusCode(StatusCodes.Status201Created));
        }