Closed foremtehan closed 1 year ago
I want to convert the file from tdlib to madeline object i used:
curl --location --request POST 'http://127.0.0.1:9503/api/MTProtoToBotAPI' --header 'Content-Type: application/json' --data-raw '{ "data":{ "document": { "file_name": "oks.mp4", "mime_type": "application/octet-stream", "file_id": "BQACAgQAAxkDAAILiWSyl4uXmb9rnrUcOjxmo-7kEXRVAAKqDgACS76RUZYP-QAB7E6fLi8E", "file_unique_id": "AgADqg4AAku-kVE", "file_size": 104857600 } } }'
But i got error:
danog\\MadelineProto\\MTProto::MTProtoToBotAPI(): Argument #1 ($data) must be of type array, string given, called in /app-host-link/vendor/danog/madelineproto/src/TL/Conversion/BotAPI.php on line 164
i also tried to try: (but got same error)
/api/MTProtoToBotAPI?data["document"]["file_name"]=oks.mp4&data["file_id"]=BQACAgQAAxkDAAILiWSyl4uXmb9rnrUcOjxmo-7kEXRVAAKqDgACS76RUZYP-QAB7E6fLi8E
How can i pass these as array?
Your document format is wrong.
because you dont have "_" key you trigger this brach and it passes all keys to MTProtoToBotAPI again. And you have strigns in your array.
I want to convert the file from tdlib to madeline object i used:
But i got error:
i also tried to try: (but got same error)
How can i pass these as array?