rapierorg / telegram-bot-swift

Telegram Bot SDK for Swift (unofficial)
https://github.com/rapierorg/telegram-bot-swift/wiki
Apache License 2.0
375 stars 63 forks source link

Unable to upload an attachment #111

Closed AKoulabukhov closed 4 years ago

AKoulabukhov commented 4 years ago

To check if multipart/form-data format should be used to send a request TelegramBot.swift:162 / TelegramBot.swift:167 performs checks on type of parameter. But the type of parameters are Optional<InputFile> and Optional<InputFileOrString> instead of InputFile and InputFileOrString. So request sent as http body and uploading ends with error: Expected status code 200, got 400: Bad Request: wrong URL host