diff --git a/app/assets/javascripts/discourse/app/components/uppy-image-uploader.js b/app/assets/javascripts/discourse/app/components/uppy-image-uploader.js index 5933c4fd9d7..7dd74d69807 100644 --- a/app/assets/javascripts/discourse/app/components/uppy-image-uploader.js +++ b/app/assets/javascripts/discourse/app/components/uppy-image-uploader.js @@ -8,11 +8,19 @@ import lightbox from "discourse/lib/lightbox"; import { next } from "@ember/runloop"; import { htmlSafe } from "@ember/template"; import { authorizesOneOrMoreExtensions } from "discourse/lib/uploads"; +import I18n from "I18n"; export default Component.extend(UppyUploadMixin, { classNames: ["image-uploader"], disabled: or("notAllowed", "uploading", "processing"), + @discourseComputed("disabled", "notAllowed") + disabledReason(disabled, notAllowed) { + if (disabled && notAllowed) { + return I18n.t("post.errors.no_uploads_authorized"); + } + }, + @discourseComputed( "currentUser.staff", "siteSettings.{authorized_extensions,authorized_extensions_for_staff}" diff --git a/app/assets/javascripts/discourse/app/templates/components/uppy-image-uploader.hbs b/app/assets/javascripts/discourse/app/templates/components/uppy-image-uploader.hbs index a7473cfc7ee..604a6aa176d 100644 --- a/app/assets/javascripts/discourse/app/templates/components/uppy-image-uploader.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/uppy-image-uploader.hbs @@ -3,7 +3,7 @@
{{/if}}
-