refactor(file): 移除文件上传路径末尾的斜杠- 修改了多个文件中的文件上传路径,移除了末尾的斜杠
- 更新了 MyQrCodeUtil、AliOssController、FileController 和 WxLoginController 中的相关方法 - 修改了 application.yml、application-prod.yml 和 application-s209.yml 中的配置项
This commit is contained in:
@@ -59,7 +59,7 @@ public class MyQrCodeUtil {
|
|||||||
* @return 二维码图片地址
|
* @return 二维码图片地址
|
||||||
*/
|
*/
|
||||||
public static String createQrCode(String type,Integer id, String content) throws IOException {
|
public static String createQrCode(String type,Integer id, String content) throws IOException {
|
||||||
String filePath = "/www/wwwroot/file.ws/file/qrcode/".concat(type).concat("/");
|
String filePath = "/www/wwwroot/file.ws/qrcode/".concat(type).concat("/");
|
||||||
String qrcodeUrl = "https://file.websoft.top/qrcode/".concat(type).concat("/");
|
String qrcodeUrl = "https://file.websoft.top/qrcode/".concat(type).concat("/");
|
||||||
// 将URL转为BufferedImage
|
// 将URL转为BufferedImage
|
||||||
BufferedImage bufferedImage = ImageIO.read(new URL(logoUrl));
|
BufferedImage bufferedImage = ImageIO.read(new URL(logoUrl));
|
||||||
|
|||||||
@@ -289,6 +289,6 @@ public class AliOssController extends BaseController {
|
|||||||
* 文件上传位置(服务器)
|
* 文件上传位置(服务器)
|
||||||
*/
|
*/
|
||||||
private String getUploadDir() {
|
private String getUploadDir() {
|
||||||
return config.getUploadPath() + "file/";
|
return config.getUploadPath() + "/";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -293,14 +293,14 @@ public class FileController extends BaseController {
|
|||||||
* 文件上传基目录
|
* 文件上传基目录
|
||||||
*/
|
*/
|
||||||
private String getUploadBaseDir() {
|
private String getUploadBaseDir() {
|
||||||
return config.getUploadPath() + "file/";
|
return config.getUploadPath() + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件上传位置(服务器)
|
* 文件上传位置(服务器)
|
||||||
*/
|
*/
|
||||||
private String getUploadDir() {
|
private String getUploadDir() {
|
||||||
return config.getUploadPath() + "file/";
|
return config.getUploadPath() + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -965,7 +965,7 @@ public class WxLoginController extends BaseController {
|
|||||||
* 文件上传位置(服务器)
|
* 文件上传位置(服务器)
|
||||||
*/
|
*/
|
||||||
private String getUploadDir() {
|
private String getUploadDir() {
|
||||||
return config.getUploadPath() + "file/";
|
return config.getUploadPath() + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ knife4j:
|
|||||||
config:
|
config:
|
||||||
# 生产环境接口
|
# 生产环境接口
|
||||||
server-url: https://server.gxwebsoft.com/api
|
server-url: https://server.gxwebsoft.com/api
|
||||||
upload-path: /www/wwwroot/file.ws/
|
upload-path: /www/wwwroot/file.ws
|
||||||
|
|
||||||
# 阿里云OSS云存储
|
# 阿里云OSS云存储
|
||||||
endpoint: https://oss-cn-shenzhen.aliyuncs.com
|
endpoint: https://oss-cn-shenzhen.aliyuncs.com
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ knife4j:
|
|||||||
config:
|
config:
|
||||||
# 生产环境接口
|
# 生产环境接口
|
||||||
server-url: https://server.gxwebsoft.com/api
|
server-url: https://server.gxwebsoft.com/api
|
||||||
upload-path: /www/wwwroot/file.ws/
|
upload-path: /www/wwwroot/file.ws
|
||||||
|
|
||||||
# 阿里云OSS云存储
|
# 阿里云OSS云存储
|
||||||
endpoint: https://oss-cn-shenzhen.aliyuncs.com
|
endpoint: https://oss-cn-shenzhen.aliyuncs.com
|
||||||
|
|||||||
@@ -95,8 +95,8 @@ config:
|
|||||||
token-key: WLgNsWJ8rPjRtnjzX/Gx2RGS80Kwnm/ZeLbvIL+NrBs=
|
token-key: WLgNsWJ8rPjRtnjzX/Gx2RGS80Kwnm/ZeLbvIL+NrBs=
|
||||||
server-url: https://server.websoft.top/api
|
server-url: https://server.websoft.top/api
|
||||||
file-server: https://file.websoft.top
|
file-server: https://file.websoft.top
|
||||||
upload-path: /Users/gxwebsoft/Documents/uploads/
|
upload-path: /Users/gxwebsoft/Documents/uploads
|
||||||
local-upload-path: /Users/gxwebsoft/Documents/uploads/
|
local-upload-path: /Users/gxwebsoft/Documents/uploads
|
||||||
|
|
||||||
# 阿里云OSS云存储
|
# 阿里云OSS云存储
|
||||||
endpoint: https://oss-cn-shenzhen.aliyuncs.com
|
endpoint: https://oss-cn-shenzhen.aliyuncs.com
|
||||||
|
|||||||
Reference in New Issue
Block a user