hello
i want send photo stored on my server bot getting error:
CouldNotUploadInputFile in CouldNotUploadInputFile.php line 29: Filename not provided for http://domain.com/XXXXX.jpg. Remote or Resource file uploads require a filename. Refer Docs for more information.
my code:
$this->telegram->sendPhoto([
'chat_id'=>'XXXXXX',
'photo'=>'http://domain.com/XXXXX.jpg'
]);
Did you try using https url?
@firegore2
yes
Latest version (develop branch) must use an InputFile object when sending ANY files.
\Telegram::bot('sdk')->sendPhoto([
'chat_id' => '',
'photo' => InputFile::create($resourceOrFile, $filename),
'caption' => '',
]);
Most helpful comment
Latest version (develop branch) must use an
InputFileobject when sending ANY files.