uploadFileServer: uploadFile Server part of uploadFle shiny module

View source: R/fileUploadModule.R

uploadFileServerR Documentation

uploadFile Server part of uploadFle shiny module

Description

uploadFile Server part of uploadFle shiny module

Usage

uploadFileServer(
  id,
  filetype = c(NULL, "geog", "any other file suffix can be used ( without the dot)"),
  saveToPath = "path to save files to on server"
)

Arguments

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

Value

text message on status of upload for printing to ui

Examples

#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)

nevilamos/FAMEFMR documentation built on April 17, 2025, 9:32 p.m.