I have an app where the user can or cannot upload a file.
When there is a failed upload attempt, I would like to know.
I tried to use observeEvent with fileInput but when the failure occurs it behaves as if there had been no attempt.
I don't know which strategy to adopt. Would anyone have any tips?
I thank in advance for any help.
att.,
Cleber
below follows script trying to implement:
options( shiny.maxRequestSize="1024" )# 1kb
ui <- fluidPage( fileInput("file1", "Any File", accept = ".pdf" ) )
server <- function(input, output) {
observeEvent( input$file1, {
print("Now I know that an attempt was made to upload a file and it was unsuccessful")
})
}
shinyApp( ui, server )