package com.xueyi.file.service;

import org.springframework.web.multipart.MultipartFile;

import java.io.File;

/**
 * 文件上传接口
 *
 * @author xueyi
 */
public interface ISysFileService {

    /**
     * 文件上传接口
     *
     * @param file 上传的文件
     * @return 访问地址
     */
    String uploadFile(MultipartFile file) throws Exception;
    String uploadExactFile(MultipartFile file, String extension) throws Exception;
    String uploadTempFile(MultipartFile file) throws Exception;
    String uploadFile(String fileName, File file) throws Exception;

    /**
     * 文件删除接口
     *
     * @param fileName 文件名
     * @return 结果
     */
    Boolean deleteFile(String fileName) throws Exception;

}
