From 2ddbd99aa5b2e396f96c6daba60fe1ac2573d9fb Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Sat, 18 May 2024 11:53:54 +0800
Subject: [PATCH] 新增RSS 订阅链接

---
 snowy-main/src/main/java/vip/xiaonuo/modular/blogFile/BlogFileController.java |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/snowy-main/src/main/java/vip/xiaonuo/modular/blogFile/BlogFileController.java b/snowy-main/src/main/java/vip/xiaonuo/modular/blogFile/BlogFileController.java
index 7ef5d49..82efee8 100644
--- a/snowy-main/src/main/java/vip/xiaonuo/modular/blogFile/BlogFileController.java
+++ b/snowy-main/src/main/java/vip/xiaonuo/modular/blogFile/BlogFileController.java
@@ -41,8 +41,6 @@
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
 
-import static vip.xiaonuo.sys.config.FileConfig.DEFAULT_BUCKET;
-
 /**
  * blog文件控制器 (提供给外部blog系统查询)
  *
@@ -66,19 +64,18 @@
     @PostMapping("/sysFileInfo/upload")
     @BusinessLog(title = "文件信息表_上传文件", opType = LogAnnotionOpTypeEnum.OTHER)
     public ResponseData upload(@RequestPart("file") MultipartFile file,
-                               @NotNull @RequestParam Integer fileType,
+                               @NotNull @RequestParam String bucketName,
                                @NotEmpty @RequestParam String authCode) {
-        if (!MyConstant.FileTypeList.contains(fileType)) {
-            throw new BlogException("错误文件类型");
-        }
 
         if (StrUtil.isEmpty(authCode) || !authCode.equals(ConstantContextHolder.getPushCode())) {
             throw new BlogException("授权码错误");
         }
 
-        String bucket = MyConstant.uploadFileBucketMap.getOrDefault(fileType, DEFAULT_BUCKET);
+        if (!MyConstant.uploadFileBucketList.contains(bucketName)) {
+            throw new BlogException("错误bucket名称");
+        }
 
-        Long fileId = fileInfoService.uploadFileBlog(file, bucket);
+        Long fileId = fileInfoService.uploadFileBlog(file, bucketName);
 
         return new SuccessResponseData(fileId);
     }

--
Gitblit v1.9.1