|
@@ -33,7 +33,7 @@ public class UploadController extends BaseController{
|
|
|
public Result uploadImg(@RequestParam("file") MultipartFile file) throws IOException {
|
|
|
Long date = System.currentTimeMillis();
|
|
|
String fileName = date + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
|
|
|
- String filePath = Constant.AGENT_PATH + "company/" + File.separator + fileName;
|
|
|
+ String filePath = Constant.AGENT_PATH + "company" + File.separator + fileName;
|
|
|
File targetFile = new File(filePath);
|
|
|
if(!targetFile.getParentFile().exists()){
|
|
|
targetFile.getParentFile().mkdirs();
|
|
@@ -52,7 +52,7 @@ public class UploadController extends BaseController{
|
|
|
String suffix = originalFilename.substring(originalFilename.lastIndexOf("."));
|
|
|
|
|
|
String newFileName = UUID.randomUUID().toString().replace("-","");
|
|
|
- String filePath = Constant.MANAGE_PATH + "e57/" + File.separator + newFileName +"."+suffix;
|
|
|
+ String filePath = Constant.MANAGE_PATH + "e57" + File.separator + newFileName +"."+suffix;
|
|
|
File targetFile = new File(filePath);
|
|
|
if(!targetFile.getParentFile().exists()){
|
|
|
targetFile.getParentFile().mkdirs();
|