Skip to content

Instantly share code, notes, and snippets.

@jcheng5
Created November 10, 2012 08:13
Show Gist options
  • Save jcheng5/4050398 to your computer and use it in GitHub Desktop.
Save jcheng5/4050398 to your computer and use it in GitHub Desktop.
Shiny file upload demo
shinyServer(function(input, output) {
output$filetable <- reactiveTable(function() {
if (is.null(input$files)) {
# User has not uploaded a file yet
return(NULL)
}
input$files
})
})
shinyUI(pageWithSidebar(
headerPanel("File input test"),
sidebarPanel(
fileInput("files", "File data", multiple=TRUE)
),
mainPanel(
tableOutput("filetable")
)
))
@jamiemkass
Copy link

I'm running my app locally and can't seem to do a multi-select for files when I specify "multiple=TRUE". I'm on Mac OS Yosemite. If it's local, don't see how my web browser figures into this. Has anyone else had this problem? I tried shift-clicking, command-clicking, command-A, and nothing works.

@lycone
Copy link

lycone commented Nov 12, 2016

What about if i don't wanna return all the file informations but just the filename. Like for example '/User/Documents/.../filename' the output would look like 'filename'

@Kumar015
Copy link

Dear,

I am new to R-shiny, Can you please help me "how to create a graph using the file which user loaded manually through fileinput function.?
Basically i would like to access the variable from the file loaded by user and create a graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment