public IActionResult UploadBackground(IFormFile file) { using Stream stream = file.OpenReadStream(); try { return(Content(ossService.UploadBackground(stream))); } catch (System.Exception ex) { Response.StatusCode = 500; return(Content(ex.Message)); } }
public IActionResult UploadBackground(IFormFile file) { using Stream stream = file.OpenReadStream(); try { ossService.UploadBackground(stream); return(Ok()); } catch (System.Exception) { return(NotFound()); } }