I'm creating a Shiny application and I need by default to have two fields for uploading files. However, I need to have a button to add more fields (whenever the user clicks this button, another field for uploading files is added) and a reset button (return to the state with only two fields). How do I do this in Shiny?
body <- dashboardBody(
tabItems(
tabItem(tabName = "plot"),
tabItem(tabName = "table",
box(width = NULL, status = "primary", solidHeader = TRUE,
title="Upload",
fileInput("classe1",
label="Class 1",
multiple = TRUE, accept = c(".jpg", ".jpeg",".png",".tif")),
br(),
fileInput("classe2",
label="Class 2",
multiple = TRUE, accept = c(".jpg", ".jpeg",".png",".tif")),
br()
)
)
)

