Implement file caching for faster retrieval and reduced database load

This commit is contained in:
2024-05-06 21:27:26 +07:00
parent df4f7cc9c8
commit 3e3e95bef4
10 changed files with 271 additions and 252 deletions

View File

@ -97,7 +97,7 @@ func ValidatePassword(password string) bool {
return hasSymbol && hasNumber >= 3 && hasUppercase
}
func ConvertFileSize(byte int) string {
func ConvertFileSize(byte int64) string {
if byte < 1024 {
return fmt.Sprintf("%d B", byte)
} else if byte < 1024*1024 {