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

[400] Bad Request: wrong file identifier/HTTP URL specified #1199

Open
FLOERKA opened this issue Mar 7, 2023 · 1 comment
Open

[400] Bad Request: wrong file identifier/HTTP URL specified #1199

FLOERKA opened this issue Mar 7, 2023 · 1 comment

Comments

@FLOERKA
Copy link

FLOERKA commented Mar 7, 2023

I get an error for some images, i send image to user by FileId
SendPhoto send = new SendPhoto(); send.setChatId(chatId); send.setPhoto(new InputFile(pathImage)); send.setReplyMarkup(markupInline); if(text != null) { send.setCaption("Выложено " + date + " пользователем @" + userName + "\n----------\n" + text); } Main.bot.sendPhoto(chatId, send);

                how to fix it?????
@centralhardware
Copy link

i get the same error when don't specify fileName, try to use following constructor public InputFile(InputStream mediaStream, String fileName)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants