Rshiny and working directory

Hi all,

Is it possible to allow the user of a web-based rshiny application to choose their working directory to upload files from? The code that I have used works when launching the rshiny app through RStudio, but it does not once the app is launched as a web-based app on shinyapps.io.

Any tips or advice appreciated!

Many thanks

Below is an example of my code within the server section of the shiny app:

if (exists("utils::choose.dir")){
setwd(utils::choose.dir())
test1<<-getwd()
} else {
setwd(tcltk::tk_choose.dir())
test2<<-getwd()
}

I think you want this
https://cran.r-project.org/web/packages/shinyFiles/index.html

1 Like

Thanks - I will take a look