fix:修复中文文件名找不到文件问题
This commit is contained in:
@@ -97,7 +97,9 @@ public class OnlinePreviewController {
|
||||
model.addAttribute("file", fileAttribute);
|
||||
FilePreview filePreview = previewFactory.get(fileAttribute);
|
||||
logger.info("预览文件url:{},previewType:{}", fileUrl, fileAttribute.getType());
|
||||
fileUrl =WebUtils.urlEncoderencode(fileUrl);
|
||||
if (!fileUrl.startsWith("file://")) {
|
||||
fileUrl = WebUtils.urlEncoderencode(fileUrl);
|
||||
}
|
||||
if (ObjectUtils.isEmpty(fileUrl)) {
|
||||
return otherFilePreview.notSupportedFile(model, "非法路径,不允许访问");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user