chore: add convert bytes to a human-readable string with the appropriate unit (bytes, MiB, or GiB)

This commit is contained in:
2024-12-12 13:28:09 +01:00
parent d880f40108
commit 1b60ca6fd2
11 changed files with 37 additions and 18 deletions

View File

@@ -94,7 +94,7 @@ func s3Backup(db *dbConfig, config *BackupConfig) {
// Send notification
utils.NotifySuccess(&utils.NotificationData{
File: finalFileName,
BackupSize: backupSize,
BackupSize: utils.ConvertBytes(uint64(backupSize)),
Database: db.dbName,
Storage: config.storage,
BackupLocation: filepath.Join(config.remotePath, finalFileName),