|
@@ -233,20 +233,21 @@ public class AppendixController implements InitializingBean {
|
|
for (MultipartFile file : files) {
|
|
for (MultipartFile file : files) {
|
|
String fileName = file.getOriginalFilename();
|
|
String fileName = file.getOriginalFilename();
|
|
if (fileName.contains(".")){
|
|
if (fileName.contains(".")){
|
|
- fileName = fileName.substring(0, fileName.lastIndexOf("."));
|
|
|
|
|
|
+// fileName = fileName.substring(0, fileName.lastIndexOf("."));
|
|
|
|
+ fileName = GeneratorUtil.genUUId();
|
|
}
|
|
}
|
|
|
|
|
|
String path = "";
|
|
String path = "";
|
|
try {
|
|
try {
|
|
CommonAppendix appendix = new CommonAppendix();
|
|
CommonAppendix appendix = new CommonAppendix();
|
|
- if (file.getOriginalFilename().contains(".")){
|
|
|
|
|
|
+ if (fileName.contains(".")){
|
|
appendix.setAppendixName(
|
|
appendix.setAppendixName(
|
|
- fileName + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")));
|
|
|
|
- path = upload(file,file.getOriginalFilename(),companyId);
|
|
|
|
|
|
+ fileName + fileName.substring(fileName.lastIndexOf(".")));
|
|
|
|
+ path = upload(file,fileName,companyId);
|
|
}else {
|
|
}else {
|
|
appendix.setAppendixName(
|
|
appendix.setAppendixName(
|
|
fileName + ".png");
|
|
fileName + ".png");
|
|
- path = upload(file,file.getOriginalFilename() + ".png",companyId);
|
|
|
|
|
|
+ path = upload(file,fileName + ".png",companyId);
|
|
}
|
|
}
|
|
|
|
|
|
appendix.setAppendixPath(path);
|
|
appendix.setAppendixPath(path);
|