Closed shahinesi closed 6 years ago
@shahinesi please check our test for working example https://github.com/TelegramBots/Telegram.Bot/blob/ce94da88aecb870b7e7a263d2f0e50da82beaba0/test/Telegram.Bot.Tests.Integ/Sending%20Messages/SendingPhotoMessageTests.cs#L36-L45
you can discuss this question in our group chat
Hi i want upload pic from my own folder asp.net but error plz help me Upload code `using (FileStream fs = System.IO.File.Open(@"|DataDirectory|\App_Data\p1.jpg", FileMode.Open)) { var file = new FileToSend("p1.jpg", fs);
and errord3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Threading.Tasks.TaskHelpersExtensions.d 3
108 bytes application/json; charset=utf-8 { "Message": "An error has occurred.", "ExceptionMessage": "Bad Request: wrong file identifier/HTTP URL specified", "ExceptionType": "Telegram.Bot.Exceptions.ApiRequestException", "StackTrace": " at Telegram.Bot.TelegramBotClient.<SendWebRequestAsync>d__125
1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n at GifBot.Controllers.WebhookController.1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()" }