@frappe.whitelist()
def remove_attach():
 import frappe.utils.file_manager
 fid = frappe.form_dict.get(u'fid')
 return frappe.utils.file_manager.remove_file(fid)

@ frappe . whitelist ( ) def remove_attach ( ) : import frappe . utils . file_manager fid = frappe . form_dict . get ( u'fid' ) return frappe . utils . file_manager . remove_file ( fid )
remove attachment .