...Hello everyone,
It's my first time here (and I am also new to shiny), so I would appreciate any help.
I am trying to save the uploaded files (within my app) to a remote dropBox. I have been trying to implement what I learned here: [https://shiny.rstudio.com/articles/persistent-data-storage.html](Permanent Storage) but so far no luck.
Here it's a snippet of my code:
Server:
t#### To upload file and generate a Table ####
data <- reactive({
req(input$file)
ext <- tools::file_ext(input$file$name)
switch(ext,
csv = vroom::vroom(input$file$datapath, delim = ","),
tsv = vroom::vroom(input$file$datapath, delim = "\t"),
xlsx = read_excel(input$file$datapath, sheet = 1),
validate("Invalid file; Please upload a .csv, .tsv or excel file")
)
})
# When the Submit button is clicked, save the form data
observeEvent(input$file, {
saveData(data())
})
output$table <- renderDataTable({
input$file
#data()
# DropBox
loadData()
})
I would greatly appreciate any help as I am trying to teach myself the elements and features of shinydashboard.