@Controller(value="baseUploadController")
@RequestMapping(value="/rest/upload")
public class UploadController
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) AttachRowService |
attachRowService |
(package private) FileUploadUtils |
utils |
| Constructor and Description |
|---|
UploadController() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<java.lang.String> |
cancel(java.lang.String dbid)
功能描述: 删除
|
org.springframework.http.ResponseEntity<java.lang.String> |
check_download(java.lang.String dbid,
javax.servlet.http.HttpServletRequest request)
功能描述: 检查文件是否存在
|
void |
download(java.lang.String dbid,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpServletRequest request)
功能描述: 下载
|
com.mbap.util.view.R |
list_data(java.lang.String className,
java.lang.String fieldName,
java.lang.String entityId)
根据业务实体信息获取相关附件
|
com.mbap.util.view.R |
ossCallBack(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
阿里云oss服务端签名直传并设置上传回调
oss对象存储成功后的回调接口
|
com.mbap.util.view.R |
ossGetSign(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
阿里云oss服务端签名直传请求接口
返回Policy和签名等信息给用户
|
void |
previewImg(java.lang.String imgId,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpServletRequest request)
功能描述: 文件预览
|
void |
upload(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
功能描述: 上传
|
@Autowired FileUploadUtils utils
@Autowired AttachRowService attachRowService
@RequestMapping(value="/",
method=POST,
name="\u9644\u4ef6\u4e0a\u4f20\u63a5\u53e3")
public void upload(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
request - 请求response - 响应java.lang.Exception@RequestMapping(method=DELETE,
value="/cancel/{dbid}",
name="\u5220\u9664\u6307\u5b9a\u9644\u4ef6")
public org.springframework.http.ResponseEntity<java.lang.String> cancel(@PathVariable
java.lang.String dbid)
dbid - 附件IDresponse - java.lang.Exception@RequestMapping(method=POST,
value="/download/{dbid}",
name="\u9644\u4ef6\u4e0b\u8f7d")
public void download(@PathVariable
java.lang.String dbid,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
dbid - 附件IDresponse - java.lang.Exception@RequestMapping(method=GET,
value="/check_download/{dbid}",
name="\u68c0\u67e5\u672c\u5730\u9644\u4ef6\u662f\u5426\u5b58\u5728")
public org.springframework.http.ResponseEntity<java.lang.String> check_download(@PathVariable
java.lang.String dbid,
javax.servlet.http.HttpServletRequest request)
dbid - 附件IDpw - java.lang.Exception@RequestMapping(method=POST,
value="/previewImg/{imgId}",
name="\u9644\u4ef6\u56fe\u7247\u9884\u89c8\u63a5\u53e3")
public void previewImg(@PathVariable
java.lang.String imgId,
javax.servlet.http.HttpServletResponse response,
javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
imgId - 图片idresponse - java.lang.Exception@RequestMapping(method=GET,
value="/{className}/{fieldName}/{entityId}",
name="\u6839\u636e\u4e1a\u52a1\u5b9e\u4f53\u4fe1\u606f\u83b7\u53d6\u76f8\u5173\u9644\u4ef6")
public com.mbap.util.view.R list_data(@PathVariable
java.lang.String className,
@PathVariable
java.lang.String fieldName,
@PathVariable
java.lang.String entityId)
className - 类名全称fieldName - 字段名称entityId - @ResponseBody
@GetMapping(value="ossGetSign",
name="oss\u670d\u52a1\u7aef\u7b7e\u540d\u76f4\u4f20\u8bf7\u6c42\u63a5\u53e3")
public com.mbap.util.view.R ossGetSign(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - response - @ResponseBody
@PostMapping(value="ossCallBack",
name="oss\u670d\u52a1\u7aef\u7b7e\u540d\u76f4\u4f20\u5e76\u8bbe\u7f6e\u4e0a\u4f20\u56de\u8c03\u63a5\u53e3")
public com.mbap.util.view.R ossCallBack(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - response -