package com.sckw.file.api.feign;

import com.sckw.file.api.BaseResult;
import com.sckw.file.api.dto.FileInfoVO;
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", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    BaseResult<FileInfoVO> fileFeignUpload(@RequestPart("file") MultipartFile file);


}
