fix(web_form) : web form file attachment link to specific doctype (#222)

This commit is contained in:
Vishal Dhayagude 2020-06-09 18:28:27 +05:30 committed by Rohan Bansal
parent 835c882656
commit df1d3be9fb

View file

@ -139,6 +139,16 @@ export default class WebForm extends frappe.ui.FieldGroup {
this.handle_success(response.message);
frappe.web_form.events.trigger('after_save');
this.after_save && this.after_save();
// args doctype and docname added to link doctype in file manager
frappe.call({
type: 'POST',
method: "frappe.handler.upload_file",
args: {
file_url: response.message.attachment,
doctype: response.message.doctype,
docname: response.message.name
}
});
}
},
always: function() {