From 6bee380e757897fd87c32fa644bb9b790d3ad863 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 20 Jan 2024 12:30:18 -0500 Subject: [PATCH] fix: retain only the 1st 32 bytes --- storage/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/storage.go b/storage/storage.go index 1b9124e..c7d7e91 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -290,7 +290,7 @@ func (s *StorageServiceImpl) GetHash(file io.Reader) ([]byte, error) { hash := hasher.Sum(nil) - return hash, nil + return hash[:32], nil } func (s *StorageServiceImpl) CreateUpload(hash []byte, uploaderID uint, uploaderIP string, size uint64, protocol string) (*models.Upload, error) {