posit-dev/r-shinylive

Shiny example 10_download downloadButton doesn't work

Closed this issue · 1 comments

I created a Shinylive app from the Shiny 10_example app; however, the downloadButton in that app doesn't work: in Chrome 119, instead of downloading a .csv file, the browser's download history lists "downloadData.jsonFailed - No file".

To reproduce (using r-shinylive 0.1.0):

$ Rscript -e 'system.file("examples", "10_download", package="shiny") |> fs::dir_copy("myapp", overwrite = TRUE)'
$ Rscript -e 'shinylive::export("myapp", "site")'
$ Rscript -e 'library(plumber); pr() |> pr_static("/", "site/") |> pr_run()'

Is there a workaround that should be applied in this situation?

I had missed the corresponding example in the posit-dev/shinylive repo, which has the workaround for the downloadButton issue.