Commit f398c68c authored by m1991's avatar m1991

资讯模块数据——视频功能修复

parent a77fd901
...@@ -55,7 +55,7 @@ public class UploadServiceImpl implements UploadService { ...@@ -55,7 +55,7 @@ public class UploadServiceImpl implements UploadService {
Map<String, Object> resultMap=new HashMap<String, Object>(); Map<String, Object> resultMap=new HashMap<String, Object>();
String basePath = request.getScheme() + "://" + request.getServerName() String basePath = request.getScheme() + "://" + request.getServerName()
+ ":" + request.getServerPort()+"/mimi/upload/video/"; + ":" + request.getServerPort()+"/upload/video/";
Long time = new Date().getTime(); Long time = new Date().getTime();
...@@ -63,7 +63,7 @@ public class UploadServiceImpl implements UploadService { ...@@ -63,7 +63,7 @@ public class UploadServiceImpl implements UploadService {
String suffixName = fileName.substring(fileName.lastIndexOf("."));//从最后一个.开始截取。截取fileName的后缀名 String suffixName = fileName.substring(fileName.lastIndexOf("."));//从最后一个.开始截取。截取fileName的后缀名
String newFileName = time+suffixName; //文件新名称 String newFileName = time+suffixName; //文件新名称
//设置文件存储路径,可以存放在你想要指定的路径里面 //设置文件存储路径,可以存放在你想要指定的路径里面
String rootPath="D:/mimi/"+File.separator+"upload/video/"; //上传视频存放位置 String rootPath="/opt/upload/video/"; //上传视频存放位置
String filePath = rootPath+newFileName; String filePath = rootPath+newFileName;
File newFile = new File(filePath); File newFile = new File(filePath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment