diff --git a/frappe/public/js/frappe/file_uploader/FileUploader.vue b/frappe/public/js/frappe/file_uploader/FileUploader.vue index b94b964876..cb04670bcd 100644 --- a/frappe/public/js/frappe/file_uploader/FileUploader.vue +++ b/frappe/public/js/frappe/file_uploader/FileUploader.vue @@ -163,6 +163,12 @@
{{ __("Google Drive") }}
+
{{ upload_notes }} @@ -291,6 +297,9 @@ const props = defineProps({ allow_google_drive: { default: true, }, + other_options: { + default: () => [], + }, }); // variables 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 c9734f7d6c..56b866d8a4 100644 --- a/frappe/public/js/frappe/file_uploader/file_uploader.bundle.js +++ b/frappe/public/js/frappe/file_uploader/file_uploader.bundle.js @@ -65,6 +65,7 @@ class FileUploader { allow_toggle_private, allow_toggle_optimize, allow_google_drive, + other_options: this.get_extra_options(), }); SetVueGlobals(app); this.uploader = app.mount(this.wrapper); @@ -126,6 +127,11 @@ class FileUploader { return this.uploader.upload_files(this.dialog); } + get_extra_options() { + // Defaults to empty list, can be overriden externally + return []; + } + make_dialog(title) { this.dialog = new frappe.ui.Dialog({ title: title || __("Upload"),