Commit 5d3ce359 authored by hezhen's avatar hezhen

修改上传

parent acf20b51
...@@ -51,12 +51,7 @@ public class UploadService { ...@@ -51,12 +51,7 @@ public class UploadService {
//文件存放路径 //文件存放路径
String filePath = baseUploadPath + realFileRelPath; String filePath = baseUploadPath + realFileRelPath;
//将文件写入指定位置 //将文件写入指定位置
File files=new File(filePath); FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath));
if(!files.exists()){
//创建目录
files.mkdirs();
}
FileUtils.copyInputStreamToFile(file.getInputStream(), files);
realFileRelPath= SystemConfig.XXMP_URL+realFileRelPath; realFileRelPath= SystemConfig.XXMP_URL+realFileRelPath;
return realFileRelPath; return realFileRelPath;
} }
......
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