From 9958bc1501d0daee954d9bba383475e55e24ebab Mon Sep 17 00:00:00 2001
From: liusuyi <1951119284@qq.com>
Date: Thu, 14 May 2026 08:18:07 +0800
Subject: [PATCH] 优化
---
ard-api/ard-api-system/src/main/java/com/ard/system/api/RemoteFileService.java | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/ard-api/ard-api-system/src/main/java/com/ard/system/api/RemoteFileService.java b/ard-api/ard-api-system/src/main/java/com/ard/system/api/RemoteFileService.java
index dd5f807..2e421c4 100644
--- a/ard-api/ard-api-system/src/main/java/com/ard/system/api/RemoteFileService.java
+++ b/ard-api/ard-api-system/src/main/java/com/ard/system/api/RemoteFileService.java
@@ -2,10 +2,7 @@
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RequestPart;
+import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import com.ard.common.core.constant.ServiceNameConstants;
import com.ard.common.core.domain.R;
@@ -30,6 +27,29 @@
public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
/**
+ * 文件上传接口
+ *
+ * @param file 文件信息
+ * @param bucketName 桶名称
+ * @return 访问地址
+ * @throws Exception
+ */
+ @PostMapping(value = "/uploadWithBucket", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+ public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file,@RequestParam("bucketName") String bucketName);
+
+ /**
+ * 文件上传接口
+ *
+ * @param file 文件信息
+ * @param bucketName 桶名称
+ * @param path 路径
+ * @return 访问地址
+ * @throws Exception
+ */
+ @PostMapping(value = "/uploadWithPath", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+ public R<SysFile> upload(@RequestPart("file") MultipartFile file, @RequestParam("bucketName") String bucketName, @RequestParam("path") String path);
+
+ /**
* 删除文件
*
* @param fileUrl 文件地址
--
Gitblit v1.9.3