Why image uploaded Telegram message is broken in 41 b size?

62 Views Asked by At

In laravel app (9.19) with guzzlehttp(7.2 ) and "laravel-notification-channels/telegram (3.0 ) I send image attached to post request like :

$response = Http::attach('document', $fileUrlToUpload, 'document.png')
    ->post(self::telegramApiUrl.$this->telegramBotToken.'/sendDocument', [
    'chat_id' => $this->channelUserId,
    'reply_to_message_id' => $replyId
] );

where $fileUrlToUpload - is valid url to image at my local hosting (I work on kubuntu 20.04 with apache2). My message at appers at Telegram channel, but image in Telegram message is broken and has 41b in size.

I replaced value of $fileUrlToUpload with accessible image url, but anyway image in Telegram message is broken and has 41b in size.

How that can be fixed ?

Thanks!

0

There are 0 best solutions below