mirror of
https://github.com/discourse/discourse.git
synced 2025-02-05 19:11:13 +00:00
2201f8f7dc
When submitting files through the form template upload field, we were having an issue where, although a validation error message was being presented to the user, the upload was still coming through, because `PickFilesButton`'s validation happens **after** the Uppy mixin finished the upload and hit `uploadDone`. This PR adds a new overridable method to the Uppy mixin and overrides it with the custom validation, which now happens before the file is sent. Additionally, we're now also using `uploadingOrProcessing` as the source of truth to show the upload/uploading label, which seems more reliable.