Load a file in a shiny app and save its location (datapath)


#1

I have a simple shiny app and I would like to know if it is possible to load a file and keep the datapath that we used to load this file.

#ui.r
fluidPage(
    
  # Copy the line below to make a file upload manager
  fileInput("file", label = h3("File input")),
  
  hr(),
  fluidRow(column(4, verbatimTextOutput("value")))
  
)
#server.r
function(input, output) {

  # You can access the value of the widget with input$file, e.g.
  output$value <- renderPrint({
    input$file$datapath
  })

}