diff options
Diffstat (limited to 'service/pixelated/controllers/attachments_controller.py')
-rw-r--r-- | service/pixelated/controllers/attachments_controller.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/service/pixelated/controllers/attachments_controller.py b/service/pixelated/controllers/attachments_controller.py index 7435ce33..68e73bd6 100644 --- a/service/pixelated/controllers/attachments_controller.py +++ b/service/pixelated/controllers/attachments_controller.py @@ -26,8 +26,8 @@ class AttachmentsController: def __init__(self, querier): self.querier = querier - def attachment(self, attachment_id): - encoding = request.args.get('encoding', '') + def attachment(self, request, attachment_id): + encoding = request.args.get('encoding', [''])[0] attachment = self.querier.attachment(attachment_id, encoding) response = send_file(io.BytesIO(attachment['content']), mimetype=self._extract_mimetype(attachment['content-type'])) |