From 85b3978061fce718f260f8231392fd4bee14ea64 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 2 Jan 2018 14:06:39 +0000 Subject: [PATCH] Force example CSV to download, not open in browser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We wouldn’t wan’t anyone just seeing the raw CSV data in their browser – it isn’t clear what a user would do with it at that point. And we wouldn’t want it navigating them away from the send page, because this might cause them to lose their place. This commit forces the file to download using the HTML5 `download` attribute: > This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. – https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download --- app/templates/views/send.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/views/send.html b/app/templates/views/send.html index 0049292f6..3215b4601 100644 --- a/app/templates/views/send.html +++ b/app/templates/views/send.html @@ -40,7 +40,7 @@ {% endcall %}

Your file will populate this template ({{ template.name }})