mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-06-03 00:15:27 +00:00
14 lines
240 B
Kotlin
14 lines
240 B
Kotlin
package dev.inmo.tgbotapi.utils
|
|
|
|
import io.ktor.utils.io.streams.asInput
|
|
import java.io.File
|
|
import java.nio.file.Files
|
|
|
|
fun StorageFile(
|
|
file: File
|
|
) = StorageFile(
|
|
StorageFileInfo(file.name)
|
|
) {
|
|
file.inputStream().asInput()
|
|
}
|