downloadBttn downloading download.htm

I'm working on an app with a shinyWidgets::downloadBttn and the download button doesn't seem to be cooperating. Here is a MWE. I am using R 4.0.3 and RStudio Server 1.4.1103.4

ui <- fluidPage(
         outputId = 'foo',
         style = 'bordered',
        color = 'primary'
server  <- function(input, output) {
     output$foo <- downloadHandler(
        filename = function() {
        content = function(con) {
            write.csv(mtcars, con)

What's the problem exactly? Your code works for me. Do you get an error message? Do you load the shinyWidgets package (library(shinyWidgets))?

I have this problem too, although in my case, the deployed server was functioning very well for ~12months until recently.

In my case, the download button would trigger a ggsave() to save a plot as .png. This worked beautifully, but now it tries to save as a HTML file, not PNG. My code hasn't changed, but could it be an under-the-hood change in the shiny function, or a shiny server update?

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.