From the course: Building Data Apps with R and Shiny: Essential Training

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

Allow users to upload data to an app

Allow users to upload data to an app

- [Instructor] It's often useful to design Shiny apps where users can upload data sets for analysis. It's helpful to provide your users with a template file which they download from the Shiny app onto their local computers. Where they they open up Excel or an equivalent and enter their own data. They then upload the file to the Shiny app which is then analyzed in the server.R file and visualized as charts and other content which is displayed to the user. Uploading files through Shiny app is much more involved than downloading files. In the ui.R file, we create a control widget using fileInput but there's no corresponding function to use on the server side. Instead, we must read in the data in the server.R file. It's important to understand how uploading files works technically. All uploaded files are stored in temporary folders on the Shiny server which are deleted when the user leaves the app. You can be sure that any files uploaded to the Shiny app are removed unless you've…

Contents