2

I have a Shiny app that produces a PDF file using rmarkdown. Because some of the code takes a little to load, the PDF can sometimes take upward of 5 seconds to be generated before the download kicks in.

Is it possible to create a UI for the shiny downloadHandler or at least post a message that says that the file is being produced? Currently, when clicking the downloadButton, a new tab is opened (in chrome) while the script is processed.

Bogdan Rau
  • 625
  • 5
  • 17
  • Maybe `withProgress` – user5029763 Apr 26 '16 at 14:36
  • I thought about that too. The problem is downloadButton initiates a new tab. would withProgress prohibit a new tab? – Bogdan Rau Apr 26 '16 at 14:38
  • I've never tried, but I don't think it would be a problem. – user5029763 Apr 26 '16 at 16:26
  • Looks like it was answered here: http://stackoverflow.com/questions/21425662/is-there-a-way-to-prevent-the-download-page-from-opening-in-r-shiny. Sadly it looks like the only way is to take a two-button approach (process & download) to minimize downtime. – Bogdan Rau Apr 26 '16 at 16:37
  • This thread seems nice too: http://stackoverflow.com/questions/25247852/shiny-app-disable-downloadbutton – user5029763 Apr 26 '16 at 20:48

0 Answers0