You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
i using a lastest version from telegram-api
I want to upload video 192MB and
send it to my channel with examples/send-video.php
i change $sendVideo->video = new InputFile('binary-test-data/demo-video.mp4'); to my file
but this error faced me
fatal error: out of memory (allocated 1613365248) (tried to allocate 201413288 bytes) in /home/ooo/public_html/2/src/InternalFunctionality/PostOptionsConstructor.php
Your issue is your-server-related. I tried your example with 188mb file on notebook with 16 GB RAM and it went thru PHP just fine. I guess that you are limited by hardware capability provided on your server.
Post the file using multipart/form-data in the usual way that files are uploaded via the browser. 10 MB max size for photos, 50 MB for other files.
If you send file bigger than that, Telegram API will respond with:
413: Request Entity Too Large
And this library will throw this exception:
\unreal4u\TelegramAPI\Exceptions\ClientException: Request Entity Too Large #413
If you try something smaller (for example 2.9 MB) PHP will upload it correctly and Telegram will accept it as it should. Only solution that came up in my mind is using recently introduced Local Bot API Server, which increasing limit up to 2000 MB. According issue #129 it should be possible with this library but I didn't tested it, yet.
Hello,
i using a lastest version from telegram-api
I want to upload video 192MB and
send it to my channel with
examples/send-video.php
i change
$sendVideo->video = new InputFile('binary-test-data/demo-video.mp4');
to my filebut this error faced me
fatal error: out of memory (allocated 1613365248) (tried to allocate 201413288 bytes) in /home/ooo/public_html/2/src/InternalFunctionality/PostOptionsConstructor.php
I added
in the top of scripts like
And this error still faced me
i tryed on too many servers
There's any solve for this problem
The text was updated successfully, but these errors were encountered: