package com.qmth.paper.library.business.service;


import com.qmth.paper.library.business.bean.vo.FilePathVo;
import com.qmth.paper.library.common.enums.UploadFileEnum;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.InputStream;

public interface FileUploadService {

    FilePathVo uploadFile(File sourceFile, UploadFileEnum uploadFileEnum, String fileName);

    FilePathVo uploadFile(MultipartFile file, UploadFileEnum uploadFileEnum, String filePathName);
    FilePathVo uploadRotateFile(File file, UploadFileEnum uploadFileEnum, String filePathName);

    File downloadFile(String path, String filePathName) throws Exception;

    InputStream downloadInputStream(String path, String ossType);

    boolean copy(String sourcePath, String destPath);

    String filePreview(String path);

    String filePreview(FilePathVo filePathVo);

    boolean deleteFile(String path);
}
