telegram icon indicating copy to clipboard operation
telegram copied to clipboard

Sending the document without a file link

Open faenir opened this issue 1 year ago • 0 comments

Could you please tell me if it’s possible to send a document without using a file link? I want to specify the file’s content as text.

Like this:

TelegramFile::create()->document('File content as string', 'filename.txt');

I used this method in Laravel 5.8 + laravel-notification-channels 0.1.1, and it worked perfectly. The file "filename.txt" with the content "File content as string" would be sent to Telegram.

Now I’ve updated Laravel to version 10.x and laravel-notification-channels to version 4.x, and this method has stopped working.

I see an error:

Telegram responded with an error 400 - Bad Request: invalid file HTTP URL specified: Wrong port number specified in the URL at /var/www/vendor/laravel-notification-channels/telegram/src/Exceptions/CouldNotSendNotification.php:31)

faenir avatar Aug 14 '24 21:08 faenir