Requiring LiveView uploads

Is there a standard way to require files in a live file uploader? It’d be nice to add required: true to allow_upload and get a generalized error just like :too_many_files.

I looked through the code to see how :too_many_files and unfortunately, there are some private functions being invoked to deal with clearing the error. However, having it work, more or less, exactly like :too_many_files would be really convenient.

2 Likes