!262 修复压缩包中,中文文件被编码问题

Merge pull request !262 from 高雄/N/A
This commit is contained in:
kailing 2023-12-26 09:07:24 +00:00 committed by Gitee
commit bef81a940e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 3 additions and 0 deletions

View File

@ -457,9 +457,12 @@ public class FileHandlerService implements InitializingBean {
String _Path = urll.getPath(); //获取url路径 String _Path = urll.getPath(); //获取url路径
String urlStrr = getSubString(_Path, compressFileKey); //反代情况下添加前缀,只获取有压缩包字符的路径 String urlStrr = getSubString(_Path, compressFileKey); //反代情况下添加前缀,只获取有压缩包字符的路径
originFileName = compressFileKey + urlStrr.trim(); //拼接完整路径 originFileName = compressFileKey + urlStrr.trim(); //拼接完整路径
originFileName = URLDecoder.decode(originFileName, uriEncoding); //压缩包文件中文编码问题
attribute.setSkipDownLoad(true); attribute.setSkipDownLoad(true);
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
e.printStackTrace(); e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} }
} }
url = WebUtils.encodeUrlFileName(url); url = WebUtils.encodeUrlFileName(url);