SpringBoot2.0 整合 FastDFS 中间件,实现文件分布式管理( 五 )

multipartFile.getSize(),originalFilename , null);

return storePath.getFullPath() ;

}

/**

* 删除文件

*/

public void deleteFile(String fileUrl) {

if (StringUtils.isEmpty(fileUrl)) {

LOGGER.info("fileUrl == >>文件路径为空...");

return;

}

try {

StorePath storePath = StorePath.parseFromUrl(fileUrl);

storageClient.deleteFile(storePath.getGroup(), storePath.getPath());

} catch (Exception e) {

LOGGER.info(e.getMessage());

推荐阅读