diff options
Diffstat (limited to 'fbin.py')
-rwxr-xr-x | fbin.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -90,6 +90,8 @@ class Application(object): def file(self, environ, start_response, path): hash = path[1] + if '.' in hash: + hash = hash.split('.')[0] filename = self.get_file_path(hash) if filename == None: start_response('404 Not Found', [('Content-Type', 'text/html')]) @@ -127,6 +129,7 @@ class Application(object): 'user': user, 'hash': hash, 'filename': filename, + 'ext': os.path.splitext(filename)[1], 'scheme': environ['wsgi.url_scheme'], 'host': environ['HTTP_HOST'], })) |