Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Why does the photo as a Sticker instead of a photo when upload? #538

Open
jerryc127 opened this issue Mar 14, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@jerryc127
Copy link

Describe the bug

Hello, I use tdl up --photo to upload pictures. Why does the picture as a Sticker instead of a photo?

To Reproduce

tdl up --photo

Expected behavior

the picture as a photo?

Version

Version: 0.16.0
Commit: 0e1ce1d
Date: 2024-02-15T02:51:19Z

go1.21.7 linux/amd64

Which OS are you running tdl on?

Linux

Additional context

No response

@jerryc127 jerryc127 added the bug Something isn't working label Mar 14, 2024
@XMLHexagram
Copy link
Contributor

Could you give more information?

var media message.MediaOption = doc
switch {
case utils.Media.IsImage(mime.String()) && elem.AsPhoto():
// webp should be uploaded as document
if mime.String() == "image/webp" {
break
}
// upload as photo
media = message.UploadedPhoto(f, caption...)

According to the source code above and my test, only image/webp(e.g. foo.webp) will be upload as a sticker and other images will be deal as photos properly.

@jerryc127
Copy link
Author

run tdl up -p /root/photo --photo
image

Photo:

Broken-2024-03-15 16 04 57-向往自由生活的男生头像。#优质头像 #值得你长期不换的头像 #氛围感拉满的头像 #男生头像 #向往自由生活的头像_1
Broken-2024-03-15 16 04 57-向往自由生活的男生头像。#优质头像 #值得你长期不换的头像 #氛围感拉满的头像 #男生头像 #向往自由生活的头像_2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants