Is it possible to download a file from the local f...
# ktor
s
Is it possible to download a file from the local file system using ktor?
b
Yes, google "static resources ktor"
s
oh - I meant downloading using the client, not serving from the server. Thank you for your answer though!
b
Ah then ofc no.
l
I remember something about the internal io layer wanting to support files. I don’t see why file://{path} wouldn’t work, but I’m not 100% sure.
I’d imagine Windows would be iffy, but on Unix-like systems, ports are files and files are files.
b
Everything is a file in unix, love that 😀
d
If you already have the file locally, why would you need to download it? Or do you mean you want to upload the local file to a remote server?
s
I was just looking for a consistent way multiplatform to access resources in test and prod environments
a
if its a filesystem, and you need to test it i n multiplatform way, I'd recommend checking okio