mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-06-25 01:03:43 +08:00
feat(storage/telegram): add support for uploading images excluding webp format
This commit is contained in:
@@ -132,6 +132,8 @@ func (t *Telegram) Save(ctx context.Context, r io.Reader, storagePath string) er
|
||||
media = docb.Video().SupportsStreaming()
|
||||
case strings.HasPrefix(mtypeStr, "audio/"):
|
||||
media = docb.Audio().Title(filename)
|
||||
case strings.HasPrefix(mtypeStr, "image/") && !strings.HasSuffix(mtypeStr, "webp"):
|
||||
media = message.UploadedPhoto(file, caption)
|
||||
}
|
||||
|
||||
sender := tctx.Sender
|
||||
|
||||
Reference in New Issue
Block a user