summaryrefslogtreecommitdiff
path: root/service/pixelated/resources/attachments_resource.py
diff options
context:
space:
mode:
authorNavaL <ayoyo@thoughtworks.com>2016-02-12 14:53:41 -0200
committerNavaL <ayoyo@thoughtworks.com>2016-02-12 14:53:41 -0200
commit077e4100160ba58ee2abf91c0572ca1c0962277e (patch)
tree336ba2bc1484d423f5f807247f13482915c91140 /service/pixelated/resources/attachments_resource.py
parent78925e0332bbc41ed37e27d506be192abdb7124e (diff)
Revert "Revert "Issue #549 - Implemented remove attachment""
This reverts commit 3c6b905d7e5b78e521b2e7692e5e32b7b0c226bc.
Diffstat (limited to 'service/pixelated/resources/attachments_resource.py')
-rw-r--r--service/pixelated/resources/attachments_resource.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/service/pixelated/resources/attachments_resource.py b/service/pixelated/resources/attachments_resource.py
index 086f6e4e..db8b4df1 100644
--- a/service/pixelated/resources/attachments_resource.py
+++ b/service/pixelated/resources/attachments_resource.py
@@ -72,6 +72,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'