package com.ruoyi.framework.recovery.service;

import com.ruoyi.common.core.domain.AjaxResult;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

public interface ICommonService {
    /**
     * 上传单个文件
     *
     * @param file 文件内容
     */
    AjaxResult uploadFile(MultipartFile file, String type, Long id) throws Exception;

    /**
     * 下载内容
     *
     * @param fileName 文件路径
     */
    ResponseEntity<Resource> downloadFile(String fileName) throws IOException;
}
