提交 99994a98 作者: 刘明祎-运维用途

Merge branch 'develop'

流水线 #7765 已通过 于阶段
in 2 分 29 秒
...@@ -77,7 +77,7 @@ public class UploadController { ...@@ -77,7 +77,7 @@ public class UploadController {
+ oldName.substring(oldName.lastIndexOf("."), oldName.length()); + oldName.substring(oldName.lastIndexOf("."), oldName.length());
ossClient.putObject(OssConstant.BUCKET, newName, inputStream); ossClient.putObject(OssConstant.BUCKET, newName, inputStream);
ossClient.shutdown(); ossClient.shutdown();
String filePath = "https://" + OssConstant.BUCKET + '.' + OssConstant.ENDPOINT + "/" + newName; String filePath = OssConstant.DOMAIN + "/" + newName;;
JSONObject jsObj = new JSONObject(); JSONObject jsObj = new JSONObject();
jsObj.put("filePath", filePath); jsObj.put("filePath", filePath);
return ResultBody.success(jsObj); return ResultBody.success(jsObj);
...@@ -196,7 +196,7 @@ public class UploadController { ...@@ -196,7 +196,7 @@ public class UploadController {
// String filePath = "https://" + OssConstant.BUCKET + '.' + // String filePath = "https://" + OssConstant.BUCKET + '.' +
// OssConstant.ENDPOINT + "/" + // OssConstant.ENDPOINT + "/" +
// newName; // newName;
list.add("https://" + OssConstant.BUCKET + '.' + OssConstant.ENDPOINT + "/" + newName); list.add(OssConstant.DOMAIN + "/" + newName);
} }
} }
ossClient.shutdown(); // 关流 ossClient.shutdown(); // 关流
...@@ -259,7 +259,7 @@ public class UploadController { ...@@ -259,7 +259,7 @@ public class UploadController {
+ oldName.substring(oldName.lastIndexOf("."), oldName.length()); + oldName.substring(oldName.lastIndexOf("."), oldName.length());
ossClient.putObject(OssConstant.BUCKET, newName, bis); ossClient.putObject(OssConstant.BUCKET, newName, bis);
log.info("视频名称:" + newName); log.info("视频名称:" + newName);
list.add("https://" + OssConstant.BUCKET + '.' + OssConstant.ENDPOINT + "/" + newName); list.add(OssConstant.DOMAIN + "/" + newName);
} }
} }
} }
...@@ -325,7 +325,7 @@ public class UploadController { ...@@ -325,7 +325,7 @@ public class UploadController {
log.info("视频名称:" + newName); log.info("视频名称:" + newName);
map.put( map.put(
"filePath", "filePath",
"https://" + OssConstant.BUCKET + '.' + OssConstant.ENDPOINT + "/" + newName); OssConstant.DOMAIN + "/" + newName);
map.put("fileName", oldName); map.put("fileName", oldName);
map.put("fileSize", file.getSize()); map.put("fileSize", file.getSize());
map.put("fileType", oldName.substring(oldName.lastIndexOf(".")).replace(".", "")); map.put("fileType", oldName.substring(oldName.lastIndexOf(".")).replace(".", ""));
...@@ -384,7 +384,7 @@ public class UploadController { ...@@ -384,7 +384,7 @@ public class UploadController {
+ oldName.substring(oldName.lastIndexOf("."), oldName.length()); + oldName.substring(oldName.lastIndexOf("."), oldName.length());
ossClient.putObject(OssConstant.BUCKET, newName, bis); ossClient.putObject(OssConstant.BUCKET, newName, bis);
log.info("图片名称:" + newName); log.info("图片名称:" + newName);
list.add("https://" + OssConstant.BUCKET + '.' + OssConstant.ENDPOINT + "/" + newName); list.add(OssConstant.DOMAIN + "/" + newName);
} }
} }
} }
...@@ -440,7 +440,7 @@ public class UploadController { ...@@ -440,7 +440,7 @@ public class UploadController {
+ oldName.substring(oldName.lastIndexOf("."), oldName.length()); + oldName.substring(oldName.lastIndexOf("."), oldName.length());
ossClient.putObject(OssConstant.BUCKET, newName, bis); ossClient.putObject(OssConstant.BUCKET, newName, bis);
log.info("图片名称:" + newName); log.info("图片名称:" + newName);
list.add("https://" + OssConstant.BUCKET + '.' + OssConstant.ENDPOINT + "/" + newName); list.add(OssConstant.DOMAIN + "/" + newName);
} }
} }
ossClient.shutdown(); // 关流 ossClient.shutdown(); // 关流
...@@ -497,7 +497,7 @@ public class UploadController { ...@@ -497,7 +497,7 @@ public class UploadController {
log.info("图片名称:" + newName); log.info("图片名称:" + newName);
map.put( map.put(
"filePath", "filePath",
"https://" + OssConstant.BUCKET + '.' + OssConstant.ENDPOINT + "/" + newName); OssConstant.DOMAIN + "/" + newName);
map.put("fileName", oldName); map.put("fileName", oldName);
map.put("fileSize", file.getSize()); map.put("fileSize", file.getSize());
map.put("fileType", oldName.substring(oldName.lastIndexOf(".")).replace(".", "")); map.put("fileType", oldName.substring(oldName.lastIndexOf(".")).replace(".", ""));
...@@ -570,7 +570,7 @@ public class UploadController { ...@@ -570,7 +570,7 @@ public class UploadController {
map.put( map.put(
"filePath", "filePath",
"https://" + OssConstant.BUCKET + '.' + OssConstant.ENDPOINT + "/" + newName); OssConstant.DOMAIN + "/" + newName);
map.put("fileName", oldName); map.put("fileName", oldName);
map.put("fileSize", file.getSize()); map.put("fileSize", file.getSize());
map.put("fileType", oldName.substring(oldName.lastIndexOf(".")).replace(".", "")); map.put("fileType", oldName.substring(oldName.lastIndexOf(".")).replace(".", ""));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论