<@U3W8YSSSV> <https://gitlab.com/-/snippets/206859...
# javalin
a
t
what are you wondering?
a
do you see any obvious flaws? any better ways of doing this?
Copy code
private fun downloadBackup(ctx: Context) {
    ctx.result(Files.readAllBytes(Path.of("/tmp/backup.zip")))
  }
also this piece - is this how static files are sent as well? Just read the bytes and send it as a result? or are there optimisations that you use when sending static files
t
no, static files are handled completely by jetty
it's pretty complex
but doing what you did should be fine too
i don't really want to "bless" application logic though
a
Ok ok np thanks!