public Resp Upload([FromForm] UploadFileReq req) { if (!ModelState.IsValid) { return(GetInvalidResp()); } return(Request.Form.Files.Count == 0 ? GetInvalidResp() : _service.Upload(req, Request.Form.Files[0].OpenReadStream())); }
/// <summary> /// 直接上传 /// </summary> /// <returns></returns> public Resp Upload(UploadFileReq req, Stream file) { return(new Resp()); }
/// <summary> /// 直接上传 /// </summary> /// <returns></returns> public Resp Upload(UploadFileReq req, Stream file) { return(new Resp(RespTypes.OperateFailed, "未实现该功能!")); }