49 lines
1.3 KiB
Java
49 lines
1.3 KiB
Java
package com.cxx.home.service;
|
|
|
|
import com.cxx.home.dto.file.ChunkInfoDto;
|
|
import com.cxx.home.dto.file.ChunkResultDto;
|
|
import com.cxx.home.dto.file.FileInfoDto;
|
|
import com.cxx.home.dto.file.FileRecordDto;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
import java.util.List;
|
|
|
|
public interface FileService {
|
|
FileRecordDto uploadFile(MultipartFile file, String path, String md5);
|
|
|
|
/**
|
|
* 上传文件块
|
|
* @param chunkInfo 文件块信息
|
|
* @param path 上传路径
|
|
* @return 是否上传成功
|
|
*/
|
|
Boolean uploadChunk(ChunkInfoDto chunkInfo, String path);
|
|
|
|
/**
|
|
* 检查文件块信息
|
|
* @param identifier 唯一标识
|
|
* @param filename 文件名
|
|
* @param path 上传文件夹路径
|
|
* @return 检查结果
|
|
*/
|
|
ChunkResultDto checkChunk(String identifier, String filename, String path);
|
|
|
|
/**
|
|
* 删除文件块
|
|
* @param identifier 唯一标识
|
|
* @param path 上传文件夹路径
|
|
* @return 是否删除成功
|
|
*/
|
|
Boolean deleteChunk(String identifier, String path);
|
|
|
|
/**
|
|
* 合并文件
|
|
* @param filename 文件名
|
|
* @param path 上传文件夹路径
|
|
* @return 是否合并成功
|
|
*/
|
|
FileRecordDto mergeFile(String filename, String path);
|
|
|
|
List<FileInfoDto> getFolderInfo(String folderName);
|
|
}
|