问题
I am trying to save a file on the server side of where I am running the shiny app but for some reason I don't see the path when I try to save it.
Here is the code that I have it currently in the shiny app
library(shinyFiles)
shinySaveButton(id = 'download.scores', label = 'Save scores', title = "Save file as...", filetype = "csv")
observe({
volumes <- c("wd"="/home/rstudio/data")
shinyFileSave(input, "download.scores", roots=volumes, session=session)
fileinfo <- parseSavePath(volumes, input$download.scores)
if (nrow(fileinfo) > 0) {
write.csv(score.show$scores, as.character(fileinfo$datapath), row.names = F)
}
})
When I try to save it, I see the blank path in the dialog box. What am I doing wrong here?
来源:https://stackoverflow.com/questions/53731269/fail-to-save-the-file-to-the-server-side-of-shiny-app