fix(upload): 修复文件上传和权限配置问题
- 修正 MyUploadUtil 中 tar/apk 文件上传调用参数,添加必需的布尔参数 - 注释掉 Shiro 配置中 /sys/upload/down/** 和 /sys/upload/show/** 的匿名访问权限 - 解决文件上传功能与安全配置的兼容性问题
This commit is contained in:
@@ -130,7 +130,7 @@ public class MyUploadUtil {
|
||||
if (fileName != null && (fileName.endsWith(".tar") || fileName.endsWith(".apk"))) {
|
||||
log.info("上传文件为tar/apk文件,使用MyUploadUtil上传");
|
||||
try {
|
||||
return upload(file.getInputStream(), bizPath, fileName);
|
||||
return upload(file.getInputStream(), bizPath, fileName,true);
|
||||
} catch (Exception e) {
|
||||
log.error("upload error {}", e.getMessage(), e);
|
||||
return null;
|
||||
|
||||
@@ -185,8 +185,8 @@ public class ShiroConfig {
|
||||
|
||||
filterChainDefinitionMap.put("/version/getSysVersionDetailByPackageName", "anon");
|
||||
filterChainDefinitionMap.put("/sys/api/notice/selectIosUpdate", "anon");
|
||||
filterChainDefinitionMap.put("/sys/upload/down/**", "anon");
|
||||
filterChainDefinitionMap.put("/sys/upload/show/**", "anon");
|
||||
// filterChainDefinitionMap.put("/sys/upload/down/**", "anon");
|
||||
// filterChainDefinitionMap.put("/sys/upload/show/**", "anon");
|
||||
|
||||
// 添加自己的过滤器并且取名为jwt
|
||||
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
|
||||
|
||||
Reference in New Issue
Block a user