Package io.ktor.client.content


Link copied to clipboard
class LocalFileContent(file: File, contentType: ContentType) : OutgoingContent.ReadChannelContent

OutgoingContent representing a local file with a specified contentType, expires date and caching

Link copied to clipboard
typealias ProgressListener = suspend (bytesSentTotal: Long, contentLength: Long) -> Unit

Callback that can be registered to listen for upload/download progress


Link copied to clipboard
fun LocalFileContent(baseDir: File, relativePath: String, contentType: ContentType = ContentType.defaultForFilePath(relativePath)): LocalFileContent

Creates an instance of LocalFileContent for a file designated by relativePath in a baseDir