Add hash check for file upload

This commit is contained in:
2024-09-14 17:28:09 +07:00
parent 0772d07fb8
commit 846db5fe0b
3 changed files with 52 additions and 14 deletions

View File

@ -16,6 +16,8 @@ type File struct {
Name string `gorm:"type:text;not null"`
Size uint64 `gorm:"not null"`
TotalChunk uint64 `gorm:"not null"`
StartHash string `gorm:"type:text;not null"`
EndHash string `gorm:"type:text;not null"`
Downloaded uint64 `gorm:"not null;default:0"`
Owner *User `gorm:"foreignKey:OwnerID;constraint:OnDelete:CASCADE;"`
}