1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

Use DEFAULT_BUFFER_SIZE

This commit is contained in:
slesh 2020-08-23 01:04:01 +03:00
parent a1b471d2ca
commit 8b79c5c76b

View File

@ -13,7 +13,7 @@ fun PathedFile.asStream(
fun PathedFile.asFile(
telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper,
dest: File = File.createTempFile(this.fileUniqueId, this.filename),
defaultBufferSize: Int = 1024
defaultBufferSize: Int = DEFAULT_BUFFER_SIZE
): File {
this.asStream(telegramAPIUrlsKeeper).use { input ->
FileOutputStream(dest).use { out ->