|
@@ -62,7 +62,7 @@ public class FileController {
|
|
|
@GetMapping("/{configId}/get/**")
|
|
|
@PermitAll
|
|
|
@Operation(summary = "下载文件")
|
|
|
- @Parameter(name = "configId", description = "配置编号", required = true)
|
|
|
+ @Parameter(name = "configId", description = "配置编号", required = true)
|
|
|
public void getFileContent(HttpServletRequest request,
|
|
|
HttpServletResponse response,
|
|
|
@PathVariable("configId") Long configId) throws Exception {
|
|
@@ -81,13 +81,14 @@ public class FileController {
|
|
|
response.setStatus(HttpStatus.NOT_FOUND.value());
|
|
|
return;
|
|
|
}
|
|
|
- if(path.contains("mp4")){
|
|
|
- String range = request.getHeader("Range");
|
|
|
- System.out.println("========Range:" + range);
|
|
|
- ServletUtils.transfer(content, range,response);
|
|
|
- } else {
|
|
|
- ServletUtils.writeAttachment(response, path, content,request);
|
|
|
- }
|
|
|
+// if(path.contains("mp4")){
|
|
|
+// String range = request.getHeader("Range");
|
|
|
+// System.out.println("========Range:" + range);
|
|
|
+// ServletUtils.transfer(content, range, response);
|
|
|
+// } else {
|
|
|
+// }
|
|
|
+ System.out.println("===============开始获取文件");
|
|
|
+ ServletUtils.writeAttachment(response, path, content, request);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/page")
|