How to consume an API which accepts only MultipartFile in spring boot? Have to pass a file from Local Server (from some specific path)
@FeignClient(name = "abc-file-upload",url ="https://abc.xyz.app")
public interface ABCFeignClient {
String AUTH_TOKEN = "Authorization";
@PostMapping(value = "/api/v1/upload",consumes = "multipart/form-data")
UploadFileResponse uploadFile(@RequestBody MultipartFile multipartFile, @RequestHeader(AUTH_TOKEN) String api_key);
}
Now I have to call this client method and have to pass a local file from a specific location like (/Users/pradeepkumar/Desktop/File_Download/file1.jpg)
How to get MultipartFile Object for a local file?