From 7985b6cac4382253216e54456407d0f40b3705d2 Mon Sep 17 00:00:00 2001 From: Wasiq-Ali Date: Wed, 19 Feb 2025 14:13:15 +0500 Subject: [PATCH] fix: file uploader modal issue. --- .../public/js/frappe/file_uploader/file_uploader.bundle.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/file_uploader/file_uploader.bundle.js b/frappe/public/js/frappe/file_uploader/file_uploader.bundle.js index b886c7703d7c..06d92d2d669c 100644 --- a/frappe/public/js/frappe/file_uploader/file_uploader.bundle.js +++ b/frappe/public/js/frappe/file_uploader/file_uploader.bundle.js @@ -19,6 +19,7 @@ class FileUploader { disable_file_browser, dialog_title, attach_doc_image, + show_upload_button, frm, make_attachments_public, } = {}) { @@ -30,6 +31,10 @@ class FileUploader { this.wrapper = wrapper.get ? wrapper.get(0) : wrapper; } + if(show_upload_button == null) { + show_upload_button = !Boolean(this.dialog); + } + if (restrictions && !restrictions.allowed_file_types) { // apply global allow list if present let allowed_extensions = frappe.sys_defaults?.allowed_file_extensions; @@ -41,7 +46,7 @@ class FileUploader { } let app = createApp(FileUploaderComponent, { - show_upload_button: !Boolean(this.dialog), + show_upload_button, doctype, docname, fieldname,