From 1fb1d92fe7f35be7597414064d8b8a526144a6b9 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Mon, 9 Jul 2018 11:46:12 +0200 Subject: [PATCH] Temporary fix to allow users to download files with extensions --- app/views/shared/champs/piece_justificative/_pj_link.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/shared/champs/piece_justificative/_pj_link.html.haml b/app/views/shared/champs/piece_justificative/_pj_link.html.haml index d808058a4..9fd18ee30 100644 --- a/app/views/shared/champs/piece_justificative/_pj_link.html.haml +++ b/app/views/shared/champs/piece_justificative/_pj_link.html.haml @@ -1,7 +1,8 @@ - pj = champ.piece_justificative_file - if champ.virus_scan.present? - if champ.virus_scan.safe? - = link_to pj.filename.to_s, url_for(pj), target: '_blank' + #FIXME : use url_for(pj) and remove download attribute when Riak content_disposition bug is solved https://github.com/betagouv/tps/issues/2180 + = link_to pj.filename.to_s, pj.service_url(expires_in: 1.hour), target: '_blank', download: pj.filename.to_s - else = pj.filename.to_s - if champ.virus_scan.pending?