feat: 企标制修订签章
This commit is contained in:
+12
@@ -222,6 +222,18 @@ public class CommonController {
|
||||
downloadAndView(id, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载文件(不带token)
|
||||
*
|
||||
* @param id 传入文件id
|
||||
* @param response 响应
|
||||
*/
|
||||
@ApiOperation(value = "下载文件(不带token)", notes = "下载文件(不带token)")
|
||||
@GetMapping(value = "/downloadWithoutToken/{id}")
|
||||
public void downloadWithoutToken(@PathVariable String id, HttpServletResponse response) {
|
||||
downloadAndView(id, response);
|
||||
}
|
||||
|
||||
private void setResponse(HttpServletResponse response, String fileName) {
|
||||
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(fileName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1));
|
||||
// 设置强制下载不打开
|
||||
|
||||
Reference in New Issue
Block a user