|
|
|
@ -25,7 +25,7 @@ public class UploadUtils
|
|
|
|
|
public static String upload(MultipartFile file,String path) throws IOException {
|
|
|
|
|
String fileName = file.getOriginalFilename();
|
|
|
|
|
String newName = UUID.randomUUID().toString()+fileName.substring(fileName.indexOf("."));
|
|
|
|
|
File saveFile = new File(path,newName);
|
|
|
|
|
File saveFile = new File(path+newName);
|
|
|
|
|
if(!saveFile.getParentFile().exists()){
|
|
|
|
|
saveFile.getParentFile().mkdirs();
|
|
|
|
|
}
|
|
|
|
|