liusuyi
2026-05-18 0b8c8d8986a35c3e36db1503125e2dff79d6d10e
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 文件地址