From 077b39a8bef9af1f09532f778fa445537f228bb0 Mon Sep 17 00:00:00 2001 From: Nico von Geyso Date: Thu, 16 Aug 2012 17:28:57 +0200 Subject: use real filename instead of sha hashes as name for file download --- app.py | 4 ++-- templates/module_show.html | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 9e38105..1f39fd4 100644 --- a/app.py +++ b/app.py @@ -108,8 +108,8 @@ def upload(study, module = None): -@app.route('//files/') -def study_show(study, oid): +@app.route('//files//') +def study_show(study, oid, filename): data = fit[study].get_file(oid) mime = magic.Magic(mime=True) header = { 'Content-Type' : mime.from_buffer(data[:1024]) } diff --git a/templates/module_show.html b/templates/module_show.html index 989d946..cbaec74 100644 --- a/templates/module_show.html +++ b/templates/module_show.html @@ -6,8 +6,9 @@ -- cgit v1.2.3-1-g7c22