View source: R/fileUploadModule.R
uploadFileServer | R Documentation |
uploadFile Server part of uploadFle shiny module
uploadFileServer(
id,
filetype = c(NULL, "geog", "any other file suffix can be used ( without the dot)"),
saveToPath = "path to save files to on server"
)
id |
module id name |
filetype |
one of three alternatives: "all" which allows any selected file(s) to be uploaded "geog" which allows load of either a geopackage (.gpkg) file OR the four critical components of a shapefile ( .shp, .prj, .shx,.dbf) OR a zip file containing one or more shapefiles, geopackages or esri geodatabases. Thee zip file is unzipped after upload. OR any other specified file suffix - tests for and allows upload only of the defined suffix |
saveToPath |
Path to save files to on server |
text message on status of upload for printing to ui
#app to upload files into cwd/temp
if(!dir.exists("temp")){dir.create("temp")}
ui <- fluidPage(
uploadFileUI(id = "myID",
label = "Select files",
multiple = T)
)
server <- function(input, output) {
uploadFileServer(id = "myID",
saveToPath = "./temp",
filetype ="geog")
}
shiny::shinyApp(ui = ui, server = server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.