通用上传http转https
This commit is contained in:
parent
b171724d2d
commit
a94b58dfed
@ -43,7 +43,9 @@ public class SysCommonController {
|
|||||||
String filePath = cpopConfig.getUploadPath();
|
String filePath = cpopConfig.getUploadPath();
|
||||||
// 上传并返回新文件名称
|
// 上传并返回新文件名称
|
||||||
String fileName = FileUploadUtils.getInstance().upload(filePath, file);
|
String fileName = FileUploadUtils.getInstance().upload(filePath, file);
|
||||||
String url = serverConfig.getUrl() + fileName;
|
//强制将http变成https
|
||||||
|
String https = serverConfig.getUrl().replace("http:", "https:");
|
||||||
|
String url = https + fileName;
|
||||||
SysFileVo sysFileVo = new SysFileVo();
|
SysFileVo sysFileVo = new SysFileVo();
|
||||||
sysFileVo.setUrl(url)
|
sysFileVo.setUrl(url)
|
||||||
.setFileName(fileName)
|
.setFileName(fileName)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user