update controller chunk endpoints
Test Workflow / test (push) Successful in 3s

This commit is contained in:
vladp
2025-12-17 22:31:30 +07:00
parent 11a7ab6a73
commit a030837d45
21 changed files with 740 additions and 163 deletions
@@ -33,6 +33,9 @@ public class FileUploadSession {
@Column(name = "file_size")
private Long fileSize;
@Column(name = "chunk_size")
private Long chunkSize;
@Column(name = "total_chunks")
private Integer totalChunks;
@@ -84,9 +87,14 @@ public class FileUploadSession {
public void prePersist() {
this.createdAt = LocalDateTime.now();
this.expiresAt = LocalDateTime.now().plusHours(24);
this.chunksUploaded = 0;
if (this.chunksUploaded == null) {
this.chunksUploaded = 0;
}
if (this.status == null) {
this.status = UploadStatus.INITIATED;
}
if (this.retryCount == null) {
this.retryCount = 0;
}
}
}
}