Shiny app: downloadHandler does not produce a file

前端 未结 3 1910
说谎
说谎 2020-12-01 14:45

I can\'t figure out what\'s going on - everything seems to work but my app does not generate a file - although it looks like it does. I run it in Windows, on RStudio 0.98.12

3条回答
  •  既然无缘
    2020-12-01 15:10

    The example provided works fine for downloading CSV in my tests (if it is from the webbrowser that is, using Run app within RStudio did cause same issue)

    Note that if you keep getting something like "download.html" from your download button instead of the downloaded content, you must make sure the ID from downloadButton("myIdHere", ...) matches output$myIdHere = downloadHandler("output.csv", ...)

    Also note that if you are using shiny modules (you probably would know if you are using this), then you want to use downloadButton(ns("myIdHere"),...) and then you still have output$myIdHere

提交回复
热议问题