From 9442be5c230e286073244451189ffc05ae6c8083 Mon Sep 17 00:00:00 2001 From: Jefferson Stachelski Date: Wed, 3 Feb 2016 14:31:53 -0200 Subject: Issue #549 - Implemented remove attachment --- service/pixelated/resources/attachments_resource.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'service/pixelated/resources/attachments_resource.py') diff --git a/service/pixelated/resources/attachments_resource.py b/service/pixelated/resources/attachments_resource.py index 249d268a..401fb321 100644 --- a/service/pixelated/resources/attachments_resource.py +++ b/service/pixelated/resources/attachments_resource.py @@ -71,6 +71,9 @@ class AttachmentResource(Resource): match = re.compile('([A-Za-z-]+\/[A-Za-z-]+)').search(content_type) return match.group(1) + def render_DELETE(self, request): + self.mail_service.delete_attachment(self.attachment_id) + class AttachmentsResource(BaseResource): BASE_URL = 'attachment' -- cgit v1.2.3