package com.github.insanusmokrassar.TelegramBotAPI.utils

import io.ktor.utils.io.streams.asInput
import java.io.File
import java.nio.file.Files

fun StorageFile(
    file: File
) = StorageFile(
    StorageFileInfo(
        Files.probeContentType(file.toPath()),
        file.name
    )
) {
    file.inputStream().asInput()
}
