summaryrefslogtreecommitdiff
path: root/service/pixelated/resources/attachments_resource.py
diff options
context:
space:
mode:
authormnandri <mnandri@eunglick.corporate.thoughtworks.com>2015-12-17 18:41:58 +0100
committermnandri <mnandri@eunglick.corporate.thoughtworks.com>2015-12-18 11:22:34 +0100
commit06ac408dbd7629d387dd7b311a26c144ee56631e (patch)
treec263a0586628b627076b12132166322714394256 /service/pixelated/resources/attachments_resource.py
parent39fa6e68fc2afaafc0e8440d212b464d2e20c326 (diff)
extracted a leap attachment store, handling all attachment responsibilities, including saving attachments.
Issue #548
Diffstat (limited to 'service/pixelated/resources/attachments_resource.py')
-rw-r--r--service/pixelated/resources/attachments_resource.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/service/pixelated/resources/attachments_resource.py b/service/pixelated/resources/attachments_resource.py
index 911fc43d..05bc923f 100644
--- a/service/pixelated/resources/attachments_resource.py
+++ b/service/pixelated/resources/attachments_resource.py
@@ -90,7 +90,7 @@ class AttachmentsResource(Resource):
fields = cgi.FieldStorage(fp=request.content, headers=(request.getAllHeaders()),
environ={'REQUEST_METHOD': 'POST'})
_file = fields['attachment']
- deferred = defer.maybeDeferred(self.mail_service.attachment_id, _file.value, _file.type)
+ deferred = self.mail_service.save_attachment(_file.value, _file.type)
def send_location(attachment_id):
request.headers['Location'] = '/%s/%s' % (self.BASE_URL, attachment_id)