feat:上传后的文件地址增加处理接口

This commit is contained in:
曾文豪
2023-01-11 11:27:38 +08:00
parent b5607d0512
commit 4dcd60ca41
2 changed files with 12 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ public class FileUploadService {
FileUtil.writeFromStream(stream, filePath.getAbsolutePath()); FileUtil.writeFromStream(stream, filePath.getAbsolutePath());
IoUtil.close(stream); IoUtil.close(stream);
return filePath.getHttpPath(); return tieshengWebConfigurer.uploadFileDeal(filePath.getHttpPath());
} catch (Exception e) { } catch (Exception e) {
throw new ApiException("文件流读取失败:" + e.getMessage()); throw new ApiException("文件流读取失败:" + e.getMessage());
} }
@@ -133,7 +133,7 @@ public class FileUploadService {
// 6删除块文件目录 // 6删除块文件目录
FileUtil.del(folder.getAbsolutePath()); FileUtil.del(folder.getAbsolutePath());
return uploadPath.getHttpPath(); return tieshengWebConfigurer.uploadFileDeal(uploadPath.getHttpPath());
} }

View File

@@ -44,6 +44,16 @@ public interface TieshengWebConfigurer {
default void uploadFileCheck(String fileExt) { default void uploadFileCheck(String fileExt) {
} }
/**
* 上传文件后处理文件
*
* @param uploadPath
* @return
*/
default String uploadFileDeal(String uploadPath) {
return uploadPath;
}
/** /**
* 配置登录 * 配置登录