Currently, when using a form in REWST to upload files, there is no built-in mechanism to restrict the file types that users can select. I propose adding functionality to define allowed file types at the form field level.
Technical Details:
Configuration Option: Allow administrators to specify permitted file extensions (e.g., .csv, .html, .pdf) or MIME types (e.g., text/csv, text/html, application/pdf) in the form configuration.
Error Handling: Provide clear error messages when a user attempts to upload a disallowed file type.
Benefits:
Improves data integrity by ensuring only expected file formats are uploaded.
Reduces risk of invalid or malicious file submissions.
Enhances user experience by guiding correct file selection.