Closed NaderSetarei closed 9 years ago
Cann you give me more details? Parameters? Code snippet?
var myPhoto= File.ReadAllBytes("I:\TelegramFolder\zoroofchiPhoto.jpg"); await zoroofchiBot.SendPhoto(update.Message.Chat.Id, myPhoto, "zoroofchi");
MrRoundRobin :-) ?
Found the underlining error. Need to figure out how to deal with it ;)
thanx MrRoundRobin
the file to be send needs a file name. i can't get the file name from byte[] so i decided to use a wrapper object:
var stream = new FileStream(@"c:\xy.png", FileMode.Open);
var fileToSend = new FileToSend("Test.png", stream);
await Bot.SendPhoto(update.Message.Chat.Id, fileToSend, update.Message.Text);
oh thanx yay its a good wraper MrRoundRobin :-)
Maybe i'll add byte[] getter/setters later
hi.how can i sned a photo by uri ? can anyone help me ?
Don't comment on unrelated 3 year old issues! Read the documentation and see examples https://telegrambots.github.io/book/3/files/upload.html#uploading-by-url If you read the Readme you'll find more help resources.
Hi there,
I have this problem to and i even used this code:
FileToSend fts = new FileToSend("test.png", stream); bot.SendPhoto(123456789,fts);
bot no change.
any idea what to do?
@Developer-313 Hello, please, read messages above. This is a long closed issue for an unsupported version of the library.
@tuscen I have read them and did anything to fix this problem but no benefit
@Developer-313 You're using version that's long unsupported. Please, upgrade. If there's a bug in the old version it won't be fixed.
@tuscen I am using the latest version 15.
@Developer-313 Then, please, fill a new bug report with as much information as you can find.
@tuscen how to do that?
@Developer-313 Open a new issue, it's already contains a template. https://help.github.com/en/github/managing-your-work-on-github/creating-an-issue
{"Required property 'result' not found in JSON. Path '', line 1, position 148."}