I've deployed my first large modular app to our company's Rconnect server. Great.
Now, rightly 20 out of the 250 users are asking me why I did not include a save functionality for the fancy DT
datatables I've built for them.
I wanted to do provide both an html file via DT::saveWidget and a PNG to allow my users to use the tables in reports etc.
So, I used an actionbutton in the module's server side:
observeEvent( input$downloadFigure, {
dat_dat <- DT::datatable(dat)
DT::saveWidget(dat_dat, 'foo.html')
}
but that just saves the widget to my own working directory which is hosted on an S3 instance etc. How can I send the file 'foo.html' to the users' browser default save location?
Separately, is it possible to also create a png file with only the widget (i.e. not the remaining webpage?)
I already use the DT buttons to download data and pdfs with no formatting or complex color-coding but I need the entire form/structure not just the values.