After poking around with different file handling functions I discovered that file.copy
can be used to download the file.
I change downloadHandler
to:
output$downloadData <- downloadHandler(
filename <- function() {
paste("output", "zip", sep=".")
},
content <- function(file) {
file.copy("out.zip", file)
},
contentType = "application/zip"
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…