*** This is the program ***
library(htmlwidgets)
library(plotly)
library(shiny)
library(webshot)
server<-function(input, output){
# fig<-plot_ly(data=iris,x=~Sepal.Length,y=~Petal.Length)
# fig
output$boton1<-downloadHandler(
filename=function() {
paste0("check.png")
},
content=function(file) {
fig<-plot_ly(data=iris,x=~Sepal.Length,y=~Petal.Length)
fig
saveWidget(fig,"check.html")
webshot("check.html",file=file)
}
)
}
ui <- fluidPage(
downloadButton("boton1","Save png as:"),
br(),
plotlyOutput("plot1")
)
*** This is the error that i get in shinyapps.io ***
Error getting logs: Internal Server Error
R/Shiny. Problem with deploy. Saving a png in downloadHandler with webshot and plotly. It works local. Does not work when i am deploying