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,