mchen
mchen

Reputation: 10156

R Shiny downloadButton error in Internet Explorer 8

Running the following minimal case:

library(shiny)
runApp(list(
    ui = bootstrapPage(downloadButton("myDownload")),
    server = function(input, output) {
        output$myDownload <- downloadHandler(
            filename = function() "mtcars.txt",
            content = function(file) write.table(mtcars, file),
            contentType = ".txt"
        )
    }
))

which looks like:

enter image description here

yields the below error in Internet Explorer 8.0.7601 when I click the download button:

enter image description here

Anyone know why this is happening?

Upvotes: 1

Views: 358

Answers (2)

Crt Ahlin
Crt Ahlin

Reputation: 303

Cannot recreate the problem, since I do not have IE 8. But I have remembered this thread, which talks about incompatibilty of shiny with Internet explorer lower than 10: shiny-discuss/websockets

So I would suggest you upgrade your browser (your code works on my Internet Explorer 10, for example.)

Upvotes: 2

Koushik Saha
Koushik Saha

Reputation: 683

does your code works with other browser like firefox or chrome? Past i have faced similar problem in download data thing. in downloadHandaler where data is getting generated i have assigned it as a global variable. after that is started working, i guess.

Upvotes: 1

Related Questions