diff --git a/crm/api/activities.py b/crm/api/activities.py index d56e5776..dbb04ed1 100644 --- a/crm/api/activities.py +++ b/crm/api/activities.py @@ -257,12 +257,12 @@ def get_lead_activities(name): return activities, calls, notes, tasks, attachments -@redis_cache() + def get_attachments(doctype, name): return frappe.db.get_all( "File", filters={"attached_to_doctype": doctype, "attached_to_name": name}, - fields=["name", "file_name", "file_url", "file_size", "is_private", "creation", "owner"], + fields=["name", "file_name", "file_type", "file_url", "file_size", "is_private", "creation", "owner"], ) or [] def handle_multiple_versions(versions): diff --git a/frontend/src/components/Activities/AttachmentArea.vue b/frontend/src/components/Activities/AttachmentArea.vue index d05d5ab3..1612c669 100644 --- a/frontend/src/components/Activities/AttachmentArea.vue +++ b/frontend/src/components/Activities/AttachmentArea.vue @@ -1,8 +1,106 @@