You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just recently I have learned that multiple = TRUE in fileInput is just a hint and is entirely enforced by the browser. For example, here is a short example of bypassing this limitation by dragging files:
CleanShot.2023-12-13.at.16.46.37.mp4
I have implemented a server-side validation to ensure that user uploads only a single file. If there is more than one file, then an error message is displayed. I want to write a test using {shinytest2} to check if a correct message is displayed.
Issue
Given a fileInput("f", multiple = FALSE) and the following {shinytest2} code only first file will make it to input$f during testing.
The text was updated successfully, but these errors were encountered:
TymekDev
changed the title
upload_file respects multiple unlike browsers
upload_file respects multiple argument in fileInput (unlike browsers)
Dec 13, 2023
Context
Just recently I have learned that
multiple = TRUE
infileInput
is just a hint and is entirely enforced by the browser. For example, here is a short example of bypassing this limitation by dragging files:CleanShot.2023-12-13.at.16.46.37.mp4
I have implemented a server-side validation to ensure that user uploads only a single file. If there is more than one file, then an error message is displayed. I want to write a test using
{shinytest2}
to check if a correct message is displayed.Issue
Given a
fileInput("f", multiple = FALSE)
and the following{shinytest2}
code only first file will make it toinput$f
during testing.However, if we provide
multiple = TRUE
, then both files will appear ininput$f
.Reprex
app.R
test-shinytest2.R
The text was updated successfully, but these errors were encountered: