|
@@ -61,15 +61,6 @@ public class FileServiceImpl implements FileService {
|
|
|
// 上传到文件存储器
|
|
|
FileClient client = fileConfigService.getMasterFileClient();
|
|
|
Assert.notNull(client, "客户端(master) 不能为空");
|
|
|
-
|
|
|
- // 本地存储时,按日期进行分文件夹存储
|
|
|
- if (client instanceof LocalFileClient) {
|
|
|
- LocalDate today = LocalDate.now();
|
|
|
- DateTimeFormatter pattern = DateTimeFormatter.ofPattern("yyyy/MM/dd/");
|
|
|
- String directory = today.format(pattern);
|
|
|
- path = directory + path;
|
|
|
- }
|
|
|
-
|
|
|
String url = client.upload(content, path, type);
|
|
|
|
|
|
// 保存到数据库
|
|
@@ -107,15 +98,6 @@ public class FileServiceImpl implements FileService {
|
|
|
// 上传到文件存储器
|
|
|
FileClient client = fileConfigService.getMasterFileClient();
|
|
|
Assert.notNull(client, "客户端(master) 不能为空");
|
|
|
-
|
|
|
- // 本地存储时,按日期进行分文件夹存储
|
|
|
- if (client instanceof LocalFileClient) {
|
|
|
- LocalDate today = LocalDate.now();
|
|
|
- DateTimeFormatter pattern = DateTimeFormatter.ofPattern("yyyy/MM/dd/");
|
|
|
- String directory = today.format(pattern);
|
|
|
- path = directory + path;
|
|
|
- }
|
|
|
-
|
|
|
String url = client.upload(content, path, type);
|
|
|
|
|
|
// 保存到数据库
|