|
@@ -198,16 +198,16 @@ public class UploadToOssUtil {
|
|
return contentJson.toString();
|
|
return contentJson.toString();
|
|
}
|
|
}
|
|
|
|
|
|
- public void uploadFileOss(File file,String filePath) {
|
|
|
|
|
|
+ public void uploadFileOss(File file) {
|
|
if(file.isFile()){
|
|
if(file.isFile()){
|
|
- String ossPath = file.getPath().replace(filePath,"");
|
|
|
|
|
|
+ String ossPath = file.getPath();
|
|
ossPath = ossPath.replace("/mnt/","");
|
|
ossPath = ossPath.replace("/mnt/","");
|
|
ossPath = ossPath.replace("\\","/");
|
|
ossPath = ossPath.replace("\\","/");
|
|
this.uploadOss(file.getPath(),ossPath);
|
|
this.uploadOss(file.getPath(),ossPath);
|
|
}else {
|
|
}else {
|
|
File[] files = file.listFiles();
|
|
File[] files = file.listFiles();
|
|
for (File file1 : files) {
|
|
for (File file1 : files) {
|
|
- uploadFileOss(file1,filePath);
|
|
|
|
|
|
+ uploadFileOss(file1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|