From bd719366d2a992164e818818a9b90481a9247647 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Sat, 16 Jun 2018 21:28:32 +1000 Subject: [PATCH] * zerobin make link really filesaving --- templates/zerobin/view.html.ep | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/zerobin/view.html.ep b/templates/zerobin/view.html.ep index 73ac9fe..a1b5e8a 100644 --- a/templates/zerobin/view.html.ep +++ b/templates/zerobin/view.html.ep @@ -1,12 +1,12 @@ % layout 'default'; % title 'Zerobin -- View'; % my $paste = stash('paste') || {}; -% my $path = sprintf '/zerobin/%d.txt', $paste->{created}; +% my $fname = sprintf '%d.txt', $paste->{created};

<%= l('View paste') %>

<%= link_to l('Create new') => "/zerobin", class => 'zerobin create' %> - <%= link_to l('Download') => $path, class => 'zerobin download' %> + <%= link_to l('Download') => "/zerobin/$fname", class => 'zerobin download', download => $fname %>