Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
pms
Commits
99994a98
提交
99994a98
authored
12月 28, 2023
作者:
刘明祎-运维用途
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
222b7a35
72a00d89
流水线
#7765
已通过 于阶段
in 2 分 29 秒
变更
1
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
8 行删除
+8
-8
UploadController.java
src/main/java/com/mmc/pms/controller/UploadController.java
+8
-8
没有找到文件。
src/main/java/com/mmc/pms/controller/UploadController.java
浏览文件 @
99994a98
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论