|
|
@@ -27,8 +27,6 @@ import java.util.stream.Collectors;
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
public class ObjectMultipartUploadService {
|
|
|
- // 20MB
|
|
|
- private final static long PART_SIZE = 1024*1024*20;
|
|
|
private final ObjectRepository objectRepository;
|
|
|
private final FileStoreService fileStoreService;
|
|
|
private final ObjectNameService objectNameService;
|
|
|
@@ -63,16 +61,18 @@ public class ObjectMultipartUploadService {
|
|
|
return new UploadedPart(objectId, url);
|
|
|
}
|
|
|
|
|
|
+ UploadedPart uploadedPart = new UploadedPart();
|
|
|
FileMultipart fileMultipart = filePartRepository.getFileMultipart(sha256sum);
|
|
|
if (fileMultipart == null) {
|
|
|
- return null;
|
|
|
+ return uploadedPart;
|
|
|
}
|
|
|
|
|
|
String contentId = fileMultipart.getContentId();
|
|
|
List<Integer> list = filePartRepository.getFileParts(contentId).stream()
|
|
|
.map(FilePart::getChunkNumber)
|
|
|
.collect(Collectors.toList());
|
|
|
- return new UploadedPart(list);
|
|
|
+ uploadedPart.setUploaded(list);
|
|
|
+ return uploadedPart;
|
|
|
}
|
|
|
|
|
|
/**
|