diff --git a/CHANGELOG.md b/CHANGELOG.md index 2902c4104e..b7b09333cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ * `Version`: * `MicroUtils`: `0.5.24` -> `0.5.25` * `UUID`: `0.3.0` -> `0.3.1` +* `Core`: + * `MultipartRequestCallFactory` now will use file name as multipart `filename` parameter instead of generated + filename ## 0.35.7 diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/MultipartRequestCallFactory.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/MultipartRequestCallFactory.kt index 2d42d15ea9..fab01c75fb 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/MultipartRequestCallFactory.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/MultipartRequestCallFactory.kt @@ -24,7 +24,7 @@ class MultipartRequestCallFactory : AbstractRequestCallFactory() { is MultipartFile -> appendInput( key, Headers.build { - append(HttpHeaders.ContentDisposition, "filename=${value.fileId}") + append(HttpHeaders.ContentDisposition, "filename=${value.filename}") }, block = value.file::input )