"""
self.buffer.write(data)
+ @base.negotiate
+ async def get(self, uuid):
+ """
+ This is mostly for debugging so that we can download
+ any uploaded content for inspection.
+ """
+ # Only allow this for admins
+ if not self.current_user.is_admin():
+ raise tornado.web.HTTPError(403)
+
+ # Fetch the upload
+ upload = await self.backend.uploads.get_by_uuid(uuid)
+ if not upload:
+ raise tornado.web.HTTPError(404, "Could not find upload %s" % uuid)
+
+ # XXX we should guess the mime type here
+
+ # Send it to the browser
+ await upload.copyinto(self)
+
@base.negotiate
async def put(self, uuid):
"""