|
@@ -152,10 +152,10 @@ public class FilesProjectController extends BaseController {
|
152
|
152
|
private boolean uploadProjectKmlFile(CmcProject cmcProject, MultipartFile uploadProjectKmlFile) throws IOException {
|
153
|
153
|
if (uploadProjectKmlFile != null) {
|
154
|
154
|
if (!uploadProjectKmlFile.isEmpty()) {
|
155
|
|
- File profilePath = new File(profile);
|
|
155
|
+ File profilePath = new File(profile + "/upload/uploadKmlFiles");
|
156
|
156
|
if (!profilePath.exists())//若此目录不存在,则创建之
|
157
|
157
|
profilePath.mkdirs();
|
158
|
|
- File transferFile = new File( profilePath + "/upload/uploadKmlFiles/" + uploadProjectKmlFile.getOriginalFilename());
|
|
158
|
+ File transferFile = new File( profilePath + "/" + uploadProjectKmlFile.getOriginalFilename());
|
159
|
159
|
if (!transferFile.exists())
|
160
|
160
|
uploadProjectKmlFile.transferTo(transferFile);
|
161
|
161
|
cmcProject.setProjectKml("/uploadKmlFiles/" + transferFile.getName());
|