fix: add fid in view file too

This commit is contained in:
Safwan Samsudeen 2026-02-20 16:21:27 +05:30
parent 57578c8b9e
commit bcade7a547

View file

@ -3,7 +3,9 @@ frappe.ui.form.on("File", {
if (frm.doc.file_url) {
frm.add_custom_button(__("View File"), () => {
if (!frappe.utils.is_url(frm.doc.file_url)) {
window.open(window.location.origin + frm.doc.file_url);
window.open(
window.location.origin + frm.doc.file_url + "?fid=" + frm.doc.name
);
} else {
window.open(frm.doc.file_url);
}