完善minio上传

This commit is contained in:
none
2023-03-08 15:56:44 +08:00
parent 1486e518cc
commit e8455a3a58
16 changed files with 321 additions and 67 deletions

View File

@@ -116,11 +116,20 @@ public class ResourceController {
return JsonResponse.error("duration参数必须存在且大于0");
}
if (poster == null || poster.trim().length() == 0) {
return JsonResponse.error("视频封面为空");
return JsonResponse.error("poster参数值不能为空");
}
}
Resource res = resourceService.create(req.getCategoryId(), type, req.getName(), extension, req.getSize(), disk, req.getFileId(), req.getPath(), req.getUrl());
Resource res = resourceService.create(
req.getCategoryId(),
type, req.getName(),
extension,
req.getSize(),
disk,
req.getFileId(),
req.getPath(),
req.getUrl()
);
if (isVideoType) {
resourceVideoService.create(res.getId(), duration, poster);