mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-07-07 07:01:21 +08:00
fix: update max upload part size to use uploader's maximum value and adjust document upload options
This commit is contained in:
@@ -108,12 +108,11 @@ func (t *Telegram) Save(ctx context.Context, r io.Reader, storagePath string) er
|
||||
caption := styling.Plain(filename)
|
||||
docb := message.UploadedDocument(file, caption).
|
||||
Filename(filename).
|
||||
ForceFile(true).
|
||||
ForceFile(false).
|
||||
MIME(mtype.String())
|
||||
|
||||
var mediaOpt message.MediaOption = docb
|
||||
sender := tctx.Sender
|
||||
_, err = sender.WithUploader(upler).To(peer).Media(ctx, mediaOpt)
|
||||
_, err = sender.WithUploader(upler).To(peer).Media(ctx, docb)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user