DEV: Set composer upload btn selectors in component (#14324)

DEV: Set composer upload btn selectors in component (#14324)

diff --git a/app/assets/javascripts/discourse/app/components/composer-editor.js b/app/assets/javascripts/discourse/app/components/composer-editor.js
index 0a625f4..f8d5282 100644
--- a/app/assets/javascripts/discourse/app/components/composer-editor.js
+++ b/app/assets/javascripts/discourse/app/components/composer-editor.js
@@ -90,6 +90,8 @@ export function cleanUpComposerUploadMarkdownResolver() {
 export default Component.extend(ComposerUpload, {
   classNameBindings: ["showToolbar:toolbar-visible", ":wmd-controls"],
 
+  fileUploadElementId: "file-uploader",
+  mobileFileUploaderId: "mobile-file-upload",
   shouldBuildScrollMap: true,
   scrollMap: null,
   processPreview: true,
diff --git a/app/assets/javascripts/discourse/app/mixins/composer-upload.js b/app/assets/javascripts/discourse/app/mixins/composer-upload.js
index 01ab335..7c5446c 100644
--- a/app/assets/javascripts/discourse/app/mixins/composer-upload.js
+++ b/app/assets/javascripts/discourse/app/mixins/composer-upload.js
@@ -331,9 +331,11 @@ export default Mixin.create({
 
   _bindMobileUploadButton() {
     if (this.site.mobileView) {
-      this.mobileUploadButton = document.getElementById("mobile-file-upload");
-      this.mobileUploadButtonEventListener = function mobileButtonEventListener() {
-        document.getElementById("file-uploader").click();
+      this.mobileUploadButton = document.getElementById(
+        this.mobileFileUploaderId
+      );
+      this.mobileUploadButtonEventListener = () => {
+        document.getElementById(this.fileUploadElementId).click();
       };
       this.mobileUploadButton.addEventListener(
         "click",

GitHub sha: cb1210da35accc28649a6ef409c1ba5f21e1f46f

This commit appears in #14324 which was approved by eviltrout. It was merged by markvanlan.