ui <-
fluidPage(sidebarPanel(
fileInput(
inputId = "csvFiles",
label = "Drag and drop here",
multiple = TRUE,
buttonLabel = "Browse...",
placeholder = "No file selected"
),
mainPanel(textOutput("fileNames"))
))
server <- function(input, output, session) {
# End user session when app is closed.
if (!interactive()) {
session$onSessionEnded(function() {
stopApp()
q("no")
})
}
renderedTableObj <- reactive({
})
# Output the files.
output$fileNames <- renderTable({
# Return immediately if user doesn't select any files.
if (is.null(input$csvFiles)) {
return()
}
return(input$csvFiles)
})
}
shinyApp(ui, server)
That's sort of the basic template if you like, I'll link some sample code I've found here: