File tree Expand file tree Collapse file tree
frappe/public/js/frappe/file_uploader Expand file tree Collapse file tree Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments