Open hadley opened 5 years ago
The error disappears if you assign the file name:
library(shiny) ui <- fluidPage( downloadButton("download") ) server <- function(input, output, session) { output$download <- downloadHandler( filename = function() "my_file", content = function(path) write.csv(mtcars, path) ) } shinyApp(ui, server)
I concur, just spent an hour trying to diagnose the same issue.
After clicking on button I see this in the console:
I'd suggest throwing an error if
filename
doesn't return a character vector of length 1