|
@@ -70,7 +70,7 @@ public class TraceService {
|
|
|
* @return 访问URL
|
|
|
*/
|
|
|
public String uploadImage(MultipartFile file) throws BDException {
|
|
|
- String image = null;
|
|
|
+ String imageUrl = null;
|
|
|
try {
|
|
|
if (file != null) {
|
|
|
//获取文件名
|
|
@@ -83,10 +83,10 @@ public class TraceService {
|
|
|
throw new BDException("图像文件必须是图片格式!");
|
|
|
}
|
|
|
String saveFileName = DateUtils.getCurrYyyyMMddHHmmssDate() + "_" + UUID.randomUUID().toString() + fileName.substring(fileName.lastIndexOf("."), fileName.length());
|
|
|
- String picFullFileName = idenRoot + "data/trace/" + saveFileName;
|
|
|
+ String picFullFileName = idenRoot + "data/final/trace/" + saveFileName;
|
|
|
FileOutputStream fos = new FileOutputStream(picFullFileName);
|
|
|
fos.write(file.getBytes());
|
|
|
- image = saveFileName;
|
|
|
+ imageUrl = fileUrl + "trace/" + saveFileName;
|
|
|
} else {
|
|
|
throw new BDException("上传失败");
|
|
|
}
|
|
@@ -94,7 +94,7 @@ public class TraceService {
|
|
|
throw new BDException("上传失败",e);
|
|
|
}
|
|
|
|
|
|
- return image;
|
|
|
+ return imageUrl;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -121,7 +121,7 @@ public class TraceService {
|
|
|
File[] imgFiles = new File[imageNameArr.length];
|
|
|
for (int i = 0; i < imageNameArr.length; i++) {
|
|
|
if (StringUtils.isNotEmpty(imageNameArr[i])){
|
|
|
- imgFiles[i] = new File(idenRoot + "data/trace/" + imageNameArr[i]);
|
|
|
+ imgFiles[i] = new File(idenRoot + "data/final/trace/" + imageNameArr[i]);
|
|
|
}
|
|
|
}
|
|
|
|