This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user