I'm trying out @tototoshi's scala-csv library and its very simple, looks like this:
def downloadFile = Action {
val f = new File("out.csv")
val writer = CSVWriter.open(f)
writer.writeAll(List(List("a", "b", "c"), List("d", "e", "f")))
writer.close()
Ok.sendFile(f, inline = false, _ => f.getName)
}
but now I the file is getting download to my project directory:
and I want it to get downloaded to the default download folder of whoever use this func, how can I do this?