|
@@ -25,9 +25,9 @@ public class UserUploadServlet extends HttpServlet {
|
|
public void fileOutputStream(HttpServletRequest req, HttpServletResponse resp)
|
|
public void fileOutputStream(HttpServletRequest req, HttpServletResponse resp)
|
|
throws ServletException, IOException {
|
|
throws ServletException, IOException {
|
|
String filepath = req.getRequestURI();
|
|
String filepath = req.getRequestURI();
|
|
- int index = filepath.indexOf(Global.FILES_fileServer);
|
|
|
|
|
|
+ int index = filepath.indexOf(Global.FILES_FILESERVER);
|
|
if(index >= 0) {
|
|
if(index >= 0) {
|
|
- filepath = filepath.substring(index + Global.FILES_fileServer.length());
|
|
|
|
|
|
+ filepath = filepath.substring(index + Global.FILES_FILESERVER.length());
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
filepath = UriUtils.decode(filepath, "UTF-8");
|
|
filepath = UriUtils.decode(filepath, "UTF-8");
|
|
@@ -35,7 +35,7 @@ public class UserUploadServlet extends HttpServlet {
|
|
logger.error(String.format("解释文件路径失败,URL地址为%s", filepath), e1);
|
|
logger.error(String.format("解释文件路径失败,URL地址为%s", filepath), e1);
|
|
}
|
|
}
|
|
|
|
|
|
- File file = new File(Global.getUserfilesBaseDir() + Global.FILES_fileServer + filepath);
|
|
|
|
|
|
+ File file = new File(Global.getUserfilesBaseDir() + Global.FILES_FILESERVER + filepath);
|
|
//此处修改为断点续传模式,实现视频分段解析,解决视频加载缓慢及微信解析异常问题
|
|
//此处修改为断点续传模式,实现视频分段解析,解决视频加载缓慢及微信解析异常问题
|
|
try{
|
|
try{
|
|
downRangeFile(file,resp,req);
|
|
downRangeFile(file,resp,req);
|