diff --git a/app/javascript/controllers/file_input_controller.js b/app/javascript/controllers/file_input_controller.js new file mode 100644 index 0000000000..2264cd4d6d --- /dev/null +++ b/app/javascript/controllers/file_input_controller.js @@ -0,0 +1,48 @@ +import { Controller } from "@hotwired/stimulus"; + +/** + * Stimulus controller to enhance the file input UI for multiple files. + * + * This controller: + * - Listens for file selection on an `` + * - Displays selected file names in a custom list **when multiple files are selected + * - Defaults to the browser’s built-in display for a single file selection + * + * Expected HTML structure should have a placeholder div for the selected file names: + * + * ```erb + *