From ec42482bea99052d631ecf6062f2a7e1e8376091 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Mon, 22 Jul 2013 15:49:43 +0200 Subject: [PATCH 1/1] Nom du fichier original lors du download. --- skins/photo_download.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skins/photo_download.py b/skins/photo_download.py index 3a185fd..674a2ae 100755 --- a/skins/photo_download.py +++ b/skins/photo_download.py @@ -1,5 +1,6 @@ req = context.REQUEST resp = req.RESPONSE -resp.setHeader('Content-Disposition', 'attachment; filename=%s' % context.getId()) +filename = getattr(context, 'orig_name', context.getId()) +resp.setHeader('Content-Disposition', 'attachment; filename=%s' % filename) return context.index_html(req, resp) -- 2.20.1