Search in sources :

Example 6 with File

use of com.zyd.blog.business.entity.File in project OneBlog by zhangyd-c.

the class BaseFileUploader method removeFile.

boolean removeFile(ApiClient apiClient, String filePath, String uploadType) {
    BizFileService fileService = SpringContextHolder.getBean(BizFileService.class);
    File file = fileService.selectFileByPathAndUploadType(filePath, uploadType);
    String fileKey = filePath;
    if (null != file) {
        fileKey = file.getFilePath();
    }
    return apiClient.removeFile(fileKey);
}
Also used : BizFileService(com.zyd.blog.business.service.BizFileService) VirtualFile(com.zyd.blog.file.entity.VirtualFile) BizFile(com.zyd.blog.persistence.beans.BizFile) File(com.zyd.blog.business.entity.File)

Aggregations

File (com.zyd.blog.business.entity.File)6 BizFile (com.zyd.blog.persistence.beans.BizFile)6 MultipartFile (org.springframework.web.multipart.MultipartFile)4 BizFileService (com.zyd.blog.business.service.BizFileService)2 VirtualFile (com.zyd.blog.file.entity.VirtualFile)2 GlobalFileException (com.zyd.blog.file.exception.GlobalFileException)2 PageInfo (com.github.pagehelper.PageInfo)1 User (com.zyd.blog.business.entity.User)1 SysConfigService (com.zyd.blog.business.service.SysConfigService)1 FileUploader (com.zyd.blog.file.FileUploader)1 ZhydException (com.zyd.blog.framework.exception.ZhydException)1 GlobalFileUploader (com.zyd.blog.plugin.file.GlobalFileUploader)1 Transactional (org.springframework.transaction.annotation.Transactional)1