Fragment uploading continue

This commit is contained in:
2024-12-28 13:56:25 +08:00
parent 30097256b6
commit 99dd7f55e0
4 changed files with 15 additions and 1 deletions

View File

@@ -315,7 +315,7 @@ func HashAttachment(file models.Attachment) (hash string, err error) {
}
// Hash with the file metadata
hasher.Write([]byte(fmt.Sprintf("%d", file.Size)))
fmt.Fprintf(hasher, "%d", file.Size)
// Return the combined hash
hash = hex.EncodeToString(hasher.Sum(nil))