자주 사용되는 메소드들
자주 사용되는 메소드들
자주 사용되는 메소드들
자주 사용되는 메소드들
public async Task <IActionResult> PostDocument(IFormFile file) { if (!_documentService.FileWithinLimit(file.Length)) { return(BadRequest("File is to large")); } if (!_documentService.CheckExtension(Path.GetExtension(file.FileName).Substring(1).ToLower())) { return(BadRequest("Wrong file extension")); } var documentId = await _documentService.Create(file, CancellationToken.None); return(Created(nameof(GetDocument), new { documentId })); }