|
@@ -101,7 +101,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
|
|
throw new BusinessException(ResultCode.FILE_TYPE_ERROR2);
|
|
throw new BusinessException(ResultCode.FILE_TYPE_ERROR2);
|
|
}
|
|
}
|
|
String format = extName.replace(".", "");
|
|
String format = extName.replace(".", "");
|
|
- CommonUpload commonUpload = commonUploadService.add(originalFilename.replace(extName, ""), url, String.valueOf(file.getSize()), uuid, fileTypeEnum, format,format,1,null,dictId,null);
|
|
|
|
|
|
+ CommonUpload commonUpload = commonUploadService.add(originalFilename.replace(extName, ""), url, String.valueOf(file.getSize()), uuid, fileTypeEnum, format,format,1,null,dictId,url);
|
|
return ResultData.ok(commonUpload);
|
|
return ResultData.ok(commonUpload);
|
|
}catch ( BusinessException e){
|
|
}catch ( BusinessException e){
|
|
log.info("upload-file-error:{}",e);
|
|
log.info("upload-file-error:{}",e);
|
|
@@ -121,7 +121,7 @@ public class CommonUploadServiceImpl extends ServiceImpl<ICommonUploadMapper, Co
|
|
try {
|
|
try {
|
|
Long fileSize = file.length();
|
|
Long fileSize = file.length();
|
|
String ossZipPath = String.format(OssPath.MANAGE_MODEL_FILE_PATH, UUID.randomUUID().toString().replace("-", ""));
|
|
String ossZipPath = String.format(OssPath.MANAGE_MODEL_FILE_PATH, UUID.randomUUID().toString().replace("-", ""));
|
|
- String sourcePath = String.format(OssPath.MANAGE_SOURCE_FILE_PATH, UUID.randomUUID().toString().replace("-", ""));
|
|
|
|
|
|
+ String sourcePath = String.format(OssPath.MANAGE_SOURCE_FILE_PATH, UUID.randomUUID().toString().replace("-", ""))+".zip";
|
|
String unzipPath = CacheUtil.basePath + ossZipPath;
|
|
String unzipPath = CacheUtil.basePath + ossZipPath;
|
|
ShellUtil.yunUpload(file.getPath(),sourcePath);
|
|
ShellUtil.yunUpload(file.getPath(),sourcePath);
|
|
|
|
|