| | |
| | | |
| | | 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; |
| | |
| | | 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 文件地址 |