read_uploaded_file: Read a File Uploaded Through Shiny

View source: R/read_uploaded_file.R

read_uploaded_fileR Documentation

Read a File Uploaded Through Shiny

Description

Reads a file uploaded via shiny::fileInput() (Phase 11, textcleaner_shiny()'s own upload step). Shiny stores an uploaded file at a temporary path (datapath) that does not necessarily carry the original file's extension, but read_data dispatches purely by sniffing the path's own extension – this function bridges the two by renaming/copying datapath to one ending in the real, original extension (from filename, the name the browser reported) before handing off.

Usage

read_uploaded_file(datapath, filename, header = TRUE, sep = ",")

Arguments

datapath

Character. The temporary file path shiny::fileInput() stored the upload at (input$file$datapath)

filename

Character. The original file name the browser reported (input$file$name) – used only for its extension

header

Boolean. Passed through to read_data. Defaults to TRUE

sep

Character. Passed through to read_data. Defaults to ","

Value

The data read from the uploaded file (a data frame for every supported extension except .Rdata, an unmodified round-trip)

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>


SemNetCleaner documentation built on Oct. 16, 2026, 5:07 p.m.