guoshilong
2024-04-24 f346908a4a98a7d1f93730a24657ab60e68c7d16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package cn.gistack.resource.feign;
 
import feign.Body;
import feign.Headers;
import org.springblade.core.launch.constant.AppConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
 
import java.io.InputStream;
 
@FeignClient(
    value = AppConstant.APPLICATION_RESOURCE_NAME,
    fallback = IOssClientFallback.class
)
public interface IOssClient {
    String API_PREFIX = "/client";
 
    String UPLOAD_FILE = API_PREFIX + "uploadFile";
 
    @PostMapping(value = UPLOAD_FILE,consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String uploadFile(@RequestParam("fileName") String fileName, @RequestPart("file") MultipartFile file) throws Exception;
}