summaryrefslogtreecommitdiff
path: root/service/pixelated/resources/attachments_resource.py
diff options
context:
space:
mode:
authorNavaL <mnandri@thoughtworks.com>2016-01-07 18:12:50 +0100
committerNavaL <mnandri@thoughtworks.com>2016-01-11 16:56:29 +0100
commitf07aa46453a311010dad3218689891f91f76e3fc (patch)
treef17a21831c3d54ce629adfaf5ac7b55e5c1d7725 /service/pixelated/resources/attachments_resource.py
parente10e43968e2a4a8ef3ef84fd7ff7e741af5e40b0 (diff)
matching POST response and GET of an attachment -- API specification
Issue #548
Diffstat (limited to 'service/pixelated/resources/attachments_resource.py')
-rw-r--r--service/pixelated/resources/attachments_resource.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/service/pixelated/resources/attachments_resource.py b/service/pixelated/resources/attachments_resource.py
index 51fcdd3e..fc3efee7 100644
--- a/service/pixelated/resources/attachments_resource.py
+++ b/service/pixelated/resources/attachments_resource.py
@@ -89,8 +89,9 @@ class AttachmentsResource(Resource):
request.headers['Location'] = '/%s/%s' % (self.BASE_URL, attachment_id)
response_json = {"ident": attachment_id,
"content-type": _file.type,
- "filename": _file.filename,
- "filesize": len(_file.value)}
+ "encoding": "base64", # hard coded for now -- not really used
+ "name": _file.filename,
+ "size": len(_file.value)}
respond_json_deferred(response_json, request, status_code=201)
def error_handler(error):