|
@@ -230,6 +230,7 @@ public class SystemConfigController extends BaseController {
|
|
|
public void view(HttpServletRequest request, HttpServletResponse response) {
|
|
|
// ISO-8859-1 ==> UTF-8 进行编码转换
|
|
|
String imgPath = extractPathFromPattern(request);
|
|
|
+ imgPath = imgPath.replace("https:/","https://");
|
|
|
if(StringUtil.isEmpty(imgPath) || imgPath=="null"){
|
|
|
return;
|
|
|
}
|
|
@@ -246,7 +247,8 @@ public class SystemConfigController extends BaseController {
|
|
|
fileUrl = systemConfigService.getFileUrlLocal(imgPath);
|
|
|
inputStream = new BufferedInputStream(new FileInputStream(fileUrl));
|
|
|
} else if(fileUploadType == 2) {
|
|
|
- fileUrl = systemConfigService.getFileUrlAliOss(imgPath);
|
|
|
+ //fileUrl = systemConfigService.getFileUrlAliOss(imgPath);
|
|
|
+ fileUrl = imgPath;
|
|
|
URL url = new URL(fileUrl);
|
|
|
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
|
|
conn.setRequestMethod("GET");
|
|
@@ -365,6 +367,6 @@ public class SystemConfigController extends BaseController {
|
|
|
private static String extractPathFromPattern(final HttpServletRequest request) {
|
|
|
String path = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
|
|
|
String bestMatchPattern = (String) request.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
|
|
|
- return new AntPathMatcher().extractPathWithinPattern(bestMatchPattern, path);
|
|
|
+ return new AntPathMatcher().extractPathWithinPattern(bestMatchPattern, path).substring(6);
|
|
|
}
|
|
|
}
|