|
@@ -174,6 +174,20 @@ public class StorageFileServiceImpl implements IStorageFileService {
|
|
|
.collect(Collectors.groupingBy(StoragePojo::getId,Collectors.collectingAndThen(Collectors.toList(),CollectionUtil::getFirst)));
|
|
.collect(Collectors.groupingBy(StoragePojo::getId,Collectors.collectingAndThen(Collectors.toList(),CollectionUtil::getFirst)));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public String generationPreUploadUrl(String fileName) {
|
|
|
|
|
+ String configId=defaultConfig.getId();
|
|
|
|
|
+ FileClient fileClient = getClient(configId);
|
|
|
|
|
+ String preUploadUrl = fileClient.generationPreUploadUrl(createBizName(fileName));
|
|
|
|
|
+ SysStorageRecordDTO record;
|
|
|
|
|
+ record = SysStorageRecordDTO.builder()
|
|
|
|
|
+ .absolutePath(preUploadUrl)
|
|
|
|
|
+ .configId(configId)
|
|
|
|
|
+ .build();
|
|
|
|
|
+ storageRecordService.insertSysStorageRecordReturnId(record);
|
|
|
|
|
+ return preUploadUrl;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
private FileClient getClient(String id){
|
|
private FileClient getClient(String id){
|
|
|
FileClient fileClient = fileClientFactory.getFileClient(id);
|
|
FileClient fileClient = fileClientFactory.getFileClient(id);
|