|
|
@@ -79,13 +79,17 @@ public class StorageFileServiceImpl implements IStorageFileService {
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public SysStorageRecordDTO upload(String configId,String cateId,String filename, byte[] content) throws Exception {
|
|
|
- SysStorageConfigDTO config=defaultConfig;
|
|
|
- if(StrUtil.isNotEmpty(configId)){
|
|
|
- config=storageConfigService.selectSysStorageConfigById(configId);
|
|
|
+ if(StrUtil.isEmpty(configId)){
|
|
|
+ configId=defaultConfig.getId();
|
|
|
}
|
|
|
+// SysStorageConfigDTO config=defaultConfig;
|
|
|
+// if(StrUtil.isNotEmpty(configId)){
|
|
|
+// config=storageConfigService.selectSysStorageConfigById(configId);
|
|
|
+// }
|
|
|
+ FileClient fileClient = fileClientFactory.getFileClient(configId);
|
|
|
String bizName = createBizName(filename);
|
|
|
String suffix = FileUtil.extName(filename);
|
|
|
- FileClient fileClient = getClient(config);
|
|
|
+// FileClient fileClient = getClient(config);
|
|
|
fileClient.upload(content,bizName);
|
|
|
String downUrl = fileClient.downUrl(bizName);
|
|
|
SysStorageRecordDTO record = SysStorageRecordDTO.builder()
|