use of com.github.tobato.fastdfs.exception.FdfsUnsupportStorePathException in project oner365-cloud by xiaozhao32.
the class FileFdfsClient method deleteFile.
/**
* 删除文件
*
* @param fileUrl 文件访问地址
*/
@Override
public Boolean deleteFile(String fileUrl) {
if (DataUtils.isEmpty(fileUrl)) {
return Boolean.FALSE;
}
try {
StorePath storePath = StorePath.parseFromUrl(fileUrl);
fastFileStorageClient.deleteFile(storePath.getGroup(), storePath.getPath());
return fileStorageService.deleteById(fileUrl);
} catch (FdfsUnsupportStorePathException e) {
logger.error("delete File FdfsUnSupportStorePathException:", e);
}
return Boolean.FALSE;
}
Aggregations