Empties the list of chosen files, as you would after a form is submitted. It does not undo an upload that has already happened.
Usage
el_upload_clear(session = shiny::getDefaultReactiveDomain(), id)Arguments
- session
Shiny session; the current one by default, as for
shiny::updateTextInput().- id
Upload ID (un-namespaced). This is Element's
dataprop, renamed to keep it distinct from the uploaded file itself.
Examples
if (interactive()) {
# inside a server function
observeEvent(input$go, {
el_upload_clear(session, "files")
})
}