fix(web_form) : web form file attachment link to specific doctype (#222)
This commit is contained in:
parent
835c882656
commit
df1d3be9fb
1 changed files with 10 additions and 0 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue