|
@@ -133,7 +133,15 @@ public class UploadToOssUtil {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if("local".equals(type)){
|
|
if("local".equals(type)){
|
|
- new File(localPath + key1);
|
|
|
|
|
|
+ try {
|
|
|
|
+ File file = new File(localPath + key1);
|
|
|
|
+ if (!file.getParentFile().exists()) {
|
|
|
|
+ file.getParentFile().mkdirs();
|
|
|
|
+ }
|
|
|
|
+ file.createNewFile();
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -173,7 +181,15 @@ public class UploadToOssUtil {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if("local".equals(type)){
|
|
if("local".equals(type)){
|
|
- new File(localPath + key1);
|
|
|
|
|
|
+ try {
|
|
|
|
+ File file = new File(localPath + key1);
|
|
|
|
+ if (!file.getParentFile().exists()) {
|
|
|
|
+ file.getParentFile().mkdirs();
|
|
|
|
+ }
|
|
|
|
+ file.createNewFile();
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -213,7 +229,15 @@ public class UploadToOssUtil {
|
|
}
|
|
}
|
|
|
|
|
|
if("local".equals(type)){
|
|
if("local".equals(type)){
|
|
- new File(localPath + key1);
|
|
|
|
|
|
+ try {
|
|
|
|
+ File file = new File(localPath + key1);
|
|
|
|
+ if (!file.getParentFile().exists()) {
|
|
|
|
+ file.getParentFile().mkdirs();
|
|
|
|
+ }
|
|
|
|
+ file.createNewFile();
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|