mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-17 13:53:49 +00:00
fixes in download file and upgrade ktor version
This commit is contained in:
parent
47b0f6d2d8
commit
580d757be2
@ -13,7 +13,7 @@ jb-dokka = "1.7.20"
|
|||||||
klock = "3.4.0"
|
klock = "3.4.0"
|
||||||
uuid = "0.6.0"
|
uuid = "0.6.0"
|
||||||
|
|
||||||
ktor = "2.2.2"
|
ktor = "2.2.3"
|
||||||
|
|
||||||
gh-release = "2.4.1"
|
gh-release = "2.4.1"
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ import java.io.File
|
|||||||
|
|
||||||
fun PartData.FileItem.download(target: File) {
|
fun PartData.FileItem.download(target: File) {
|
||||||
provider().use { input ->
|
provider().use { input ->
|
||||||
target.outputStream().use {
|
target.outputStream().asOutput().use {
|
||||||
input.copyTo(it.asOutput())
|
input.copyTo(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user