fix: 不限制后缀名

dev
huangfeng 1 year ago
parent 724e1246a4
commit 795295f75c

@ -41,8 +41,7 @@ public class UpgradeController extends BaseController {
if (file == null) { if (file == null) {
throw new ApiException("缺少上传的文件"); throw new ApiException("缺少上传的文件");
} }
if (StringUtils.isBlank(file.getOriginalFilename()) || if (StringUtils.isBlank(file.getOriginalFilename())) {
!file.getOriginalFilename().endsWith(".apk") && !file.getOriginalFilename().endsWith(".zip")) {
throw new ApiException("文件格式不正确"); throw new ApiException("文件格式不正确");
} }
MntnUpgrades record = new MntnUpgrades(); MntnUpgrades record = new MntnUpgrades();

Loading…
Cancel
Save