Good day to all, please help me understand what the problem is!
I'm trying to send Album to telegram via Madeline's library
Here is my code:
$telegram->sendMediaGroup([
'chat_id' => '-1001396042418',
'media' =>
[
[
"type" => "photo",
"media" => new InputFile('/var/www/madeline/tmp/x-file.jpg', '314441'),
"caption" => "an optional description of the first photo"
],
[
"type" => "photo",
"media" => new InputFile('/var/www/madeline/tmp/x-file.jpg', '314441'),
"caption" => "an optional description of the first photo"
],
],
]);
And I always get an error like:
A path to local file, a URL, or a file resource should be uploaded using `Telegram\Bot\FileUpload\InputFile::create($pathOrUrlOrResource, $filename)` for `media` property. Please view docs for example. [/var/www/vendor/irazasyed/telegram-bot-sdk/src/Exceptions/CouldNotUploadInputFile.php:52]
tell me what I'm doing wrong at the moment