Set a preset directory to upload files

Hi, I am trying to create an app that allows a user to upload a file to some preset directory. I want the file to show in the directory. Here is my code to upload a file. I have been looking everywhere online on how to set up a directory, or upload a directory into my shiny app. What can I do to make this app.

ui <- fluidPage(
fileInput("upload", NULL, buttonLabel = "Upload...",
multiple = TRUE),
tableOutput("files")
)
server <- function(input,output,session) {
output$files <- renderTable(input$upload)
}
shinyApp(ui,server)

1 Like

Rather than trying to override the default directory when Shiny uploads files, I'd recommend just moving the file to its target destination once you've uploaded it.

Is there a way to show the default directory when Shiny uploads files?

I don't think you should even think about that; just use input$file$datapath then copy to where you want it.

Okay thank you that is really helpful.