|
@@ -51,6 +51,12 @@ public class UploadController extends BaseController{
|
|
|
|| StringUtils.isBlank(uploadDto.getFileName()) || uploadDto.getFileSize() ==null){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
+ if(uploadDto.getId() != null){
|
|
|
+ UploadChunk uploadChunk = uploadChunkService.getById(uploadDto.getId());
|
|
|
+ if(!uploadChunk.getFileMd5().equals(uploadDto.getFileMd5())){
|
|
|
+ throw new BusinessException(ResultCode.upload_error2);
|
|
|
+ }
|
|
|
+ }
|
|
|
uploadDto.setDeptId(getDeptId());
|
|
|
uploadDto.setUserName(getUserName());
|
|
|
String suffix = uploadDto.getFileName().substring(uploadDto.getFileName().lastIndexOf("."));
|