mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-07-31 01:56:43 +08:00
fix: correct split size calculation in Save method
This commit is contained in:
@@ -95,7 +95,7 @@ func (t *Telegram) Save(ctx context.Context, r io.Reader, storagePath string) er
|
|||||||
if !seekable || rs == nil {
|
if !seekable || rs == nil {
|
||||||
return fmt.Errorf("reader must implement io.ReadSeeker")
|
return fmt.Errorf("reader must implement io.ReadSeeker")
|
||||||
}
|
}
|
||||||
splitSize := t.config.SplitSizeMB * 1024 * 1000
|
splitSize := t.config.SplitSizeMB * 1024 * 1024
|
||||||
if splitSize <= 0 {
|
if splitSize <= 0 {
|
||||||
splitSize = DefaultSplitSize
|
splitSize = DefaultSplitSize
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user