增加 file 的文件名的字段,同步最新 SQL

This commit is contained in:
YunaiV
2022-06-15 08:24:06 +08:00
parent df7bba7f30
commit d3fe187696
6 changed files with 72 additions and 187 deletions

View File

@@ -43,6 +43,10 @@ public class FileServiceImpl implements FileService {
if (StrUtil.isEmpty(path)) {
path = DigestUtil.md5Hex(content) + '.' + type;
}
// 如果 name 为空,则使用 path 填充
if (StrUtil.isEmpty(name)) {
name = path;
}
// 上传到文件存储器
FileClient client = fileConfigService.getMasterFileClient();