package com.ard.inspection.service;
|
|
|
import com.ard.common.core.domain.AjaxResult;
|
import com.ard.inspection.domain.UploadFileEntity;
|
import org.springframework.web.multipart.MultipartFile;
|
|
import java.util.Map;
|
|
public interface IBigFileUploadService {
|
|
/**
|
* 检查分片是否存在
|
*
|
* @param fileMd5 fileMd5
|
* @param chunkPath 切片临时目录
|
*/
|
public Map<String, Object> checkChunk(String fileMd5, String chunkPath);
|
|
/**
|
* 上传分片
|
*
|
* @param file 文件
|
* @param chunkNumber chunkNumber
|
* @param fileMd5 fileMd5
|
* @param chunkPath 切片临时目录
|
*/
|
public Map<String, Object> uploadChunk(MultipartFile file,
|
Integer chunkNumber,
|
String fileMd5,
|
String chunkPath);
|
|
public Map<String, Object> uploadChunk(MultipartFile file,
|
UploadFileEntity uploadFileEntity,
|
String chunkPath);
|
|
/**
|
* 合并切片
|
*
|
* @param md5 文件MD5
|
* @param fileName 原始文件名
|
* @param uploadPath 上传文件存储路径
|
*/
|
public Map<String, Object> mergeChunks(String md5,
|
String fileName,
|
String uploadPath);
|
|
/**
|
* 大文件上传并解压接口
|
* @param file 上传的ZIP文件
|
* @param overwrite 是否覆盖已存在文件(默认false)
|
* @param uploadPath 上传文件存储路径
|
* @param chunkPath 临时切片存储路径
|
* @param zipPath 解压文件存储路径
|
* @return 上传结果
|
*/
|
public AjaxResult uploadBigZipFile(MultipartFile file,
|
boolean overwrite,
|
String uploadPath,
|
String chunkPath,
|
String zipPath);
|
|
}
|