fix: correct split size calculation in Save method

This commit is contained in:
krau
2025-12-16 20:52:17 +08:00
parent 280fd6ead8
commit c0b4580e34

View File

@@ -95,7 +95,7 @@ func (t *Telegram) Save(ctx context.Context, r io.Reader, storagePath string) er
if !seekable || rs == nil {
return fmt.Errorf("reader must implement io.ReadSeeker")
}
splitSize := t.config.SplitSizeMB * 1024 * 1000
splitSize := t.config.SplitSizeMB * 1024 * 1024
if splitSize <= 0 {
splitSize = DefaultSplitSize
}