com.github.tobato.fastdfs.service.FastFileStorageClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastdfs-client Show documentation
Show all versions of fastdfs-client Show documentation
基于yuqih发布的代码与fastdfs-client 官方1.26版本的重构
package com.github.tobato.fastdfs.service;
import java.io.InputStream;
import java.util.Set;
import com.github.tobato.fastdfs.domain.MataData;
import com.github.tobato.fastdfs.domain.StorePath;
/**
* 面向普通应用的文件操作接口封装
*
* @author tobato
*
*/
public interface FastFileStorageClient extends GenerateStorageClient {
/**
* 上传一般文件
*
* @param inputStream
* @param fileSize
* @param fileExtName
* @param metaDataSet
* @return
*/
StorePath uploadFile(InputStream inputStream, long fileSize, String fileExtName, Set metaDataSet);
/**
* 上传图片并且生成缩略图
*
*
* 支持的图片格式包括"JPG", "JPEG", "PNG", "GIF", "BMP", "WBMP"
*
*
* @param inputStream
* @param fileSize
* @param fileExtName
* @param metaDataSet
* @return
*/
StorePath uploadImageAndCrtThumbImage(InputStream inputStream, long fileSize, String fileExtName,
Set metaDataSet);
/**
* 删除文件
*
* @param filePath 文件路径(groupName/path)
*/
void deleteFile(String filePath);
}