X-Git-Url: https://scm.cri.ensmp.fr/git/Portfolio.git/blobdiff_plain/011a53d5681ad1f5fa88a534ec041c93d3e7be95..9d15a219a1b6910463064c64f9c211c606b4b5eb:/skins/photo_download.py 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)