Two questions: - I'm using that for streaming data...
# ktor
j
Two questions: • I'm using that for streaming data directly to a file:
Copy code
storage.api.prepareRequest {
     prepareDownloadRequest(path, public, transform)
     extra()
}.execute {
     it.bodyAsChannel().copyTo(file.writeChannel())
}
Is that the right way? • While doing that, if I don't set the request timeout extremely high, it's always gonna timeout with a >1GB file. What can I do about that? (Without just setting the timeout extremely high)
a
Yes, that seems right. What engine do you use?
j
I'm using the CIO engine
a
Can you try another engine?
j
That didn't help, I think it's my problem as I'm testing to download stuff locally and downloading the actual data on the actual server it works perfectly fine. Thank you anyway!