Error on file send
Opened this issue · 1 comments
Mrestof commented
Hello, I get an error, when I try to send a file. There is no problem with text messages.
The code:
...
int someid = 0;
char str[4096];
snprintf(str, SIZE_OF_ARRAY(str), "/path/to/a/document.extension");
ret = telebot_send_document(handle, someid, str, true, "", "aaa", "", false,0,"");
if (ret != TELEBOT_ERROR_NONE) {
printf("Failed to send message: %d \n", ret);
}
...
The error message:
[ERROR][telebot_core_curl_perform:129]Failed to curl_easy_perform
Error: Failed to open/read local data from file/application (26)
Failed to send message: -1
smartnode commented
Make sure your tool/app has proper access right to the document you are sending.