package ink.wgink.module.file.service.filecenter;

import ink.wgink.module.file.enums.UploadTypeEnum;
import ink.wgink.module.file.pojo.dtos.v2.FileUploadSuccessDTO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @ClassName: IFileCenterService
 * @Description: 文件中心
 * @Author: wanggeng
 * @Date: 2022/8/6 13:36
 * @Version: 1.0
 */
public interface IFileCenterService {

    /**
     * 单文件上传
     *
     * @param userId
     * @param uploadFile
     * @param uploadTypeEnum
     * @return
     */
    FileUploadSuccessDTO uploadSingleByUserId(String userId, MultipartFile uploadFile, UploadTypeEnum uploadTypeEnum);

    /**
     * 文件下载
     *
     * @param request
     * @param response
     * @param fileId
     */
    void download(HttpServletRequest request, HttpServletResponse response, String fileId);

}
