Could anyone tell me which Javascript expression I should use as condition
argument in a conditionalPanel
function in the UI-side of a R Shiny App to test if a file has been uploaded ?
I've tried several expressions (==0, ==true, .length, etc.), but haven't found anyone that works...
library(fullPage)
library(shiny)
library(shinyWidgets)
ui <- pagePiling(
center = TRUE,
sections.color = c("#CFE2F3"),
menu = c(
"Tab1" = "exploit"
),
pageSection(
fileInput("selectFile", "Choose a file",
multiple = FALSE
),
conditionalPanel(condition="##TEST IF FILE LOADED",
downloadButton('download_file',
"Download the uploaded file"))
)
)
server <- function(input, output){
}
shinyApp(ui, server)
Thanks in advance if you can help
NB: I know that I could achieve the same result by using uiOutput
in the UI-side and then a test with input$selectFile
in the server-side, but I would like to learn how to do it with a Javascript expression.