commit | 98e6b77575ca0fda782640d72dc1dac6192b71bb | [log] [tgz] |
---|---|---|
author | Avery Pennarun <apenwarr@gmail.com> | Tue Jun 24 21:35:50 2014 -0400 |
committer | Avery Pennarun <apenwarr@gmail.com> | Tue Jun 24 21:35:50 2014 -0400 |
tree | 7f6f4539859fe4ff8093b5b7c03d69ea6226ca41 | |
parent | 5f0dc662ca583bb1fbf1ee784c50c6480134f18e [diff] |
Add file download handler.
diff --git a/app.py b/app.py index f77c7e5..006d3d2 100644 --- a/app.py +++ b/app.py
@@ -121,6 +121,12 @@ self.redirect('/view/%s' % blob_info.key()) +class DownloadHandler(blobstore_handlers.BlobstoreDownloadHandler): + def get(self, blobres): + blob_info = blobstore.BlobInfo.get(str(urllib.unquote(blobres))) + self.send_blob(blob_info) + + def _Boxes(blob_info): boxes = memcache.get(str(blob_info.key()), namespace='boxes') if not boxes: