package com.sckw.file.api.feign;

import com.sckw.core.web.response.HttpResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(name = "sckw-ng-file", contextId = "FileApiService")
public interface FileApiService {

    /**
     * 上传文件
     *
     * @param file
     * @return
     */
    @PostMapping(value = "/common/upload",produces =  MediaType.MULTIPART_FORM_DATA_VALUE)
    HttpResult fileFeignUpload(@RequestPart("file") MultipartFile file);


}
