Skip to content

Commit dd9558e

Browse files
authored
Merge pull request #87 from Wasiq-Ali/version-15
fix: file uploader modal issue.
2 parents aa3e74b + 7985b6c commit dd9558e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

frappe/public/js/frappe/file_uploader/file_uploader.bundle.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class FileUploader {
1919
disable_file_browser,
2020
dialog_title,
2121
attach_doc_image,
22+
show_upload_button,
2223
frm,
2324
make_attachments_public,
2425
} = {}) {
@@ -30,6 +31,10 @@ class FileUploader {
3031
this.wrapper = wrapper.get ? wrapper.get(0) : wrapper;
3132
}
3233

34+
if(show_upload_button == null) {
35+
show_upload_button = !Boolean(this.dialog);
36+
}
37+
3338
if (restrictions && !restrictions.allowed_file_types) {
3439
// apply global allow list if present
3540
let allowed_extensions = frappe.sys_defaults?.allowed_file_extensions;
@@ -41,7 +46,7 @@ class FileUploader {
4146
}
4247

4348
let app = createApp(FileUploaderComponent, {
44-
show_upload_button: !Boolean(this.dialog),
49+
show_upload_button,
4550
doctype,
4651
docname,
4752
fieldname,

0 commit comments

Comments
 (0)