mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-06-28 18:51:25 +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()
|
media = docb.Video().SupportsStreaming()
|
||||||
case strings.HasPrefix(mtypeStr, "audio/"):
|
case strings.HasPrefix(mtypeStr, "audio/"):
|
||||||
media = docb.Audio().Title(filename)
|
media = docb.Audio().Title(filename)
|
||||||
|
case strings.HasPrefix(mtypeStr, "image/") && !strings.HasSuffix(mtypeStr, "webp"):
|
||||||
|
media = message.UploadedPhoto(file, caption)
|
||||||
}
|
}
|
||||||
|
|
||||||
sender := tctx.Sender
|
sender := tctx.Sender
|
||||||
|
|||||||
Reference in New Issue
Block a user