% layout 'default'; % title 'Filebin -- View'; % my $file = stash('file') || {};

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

<%= link_to l('Upload') => "/filebin", class => 'filebin upload' %>  <%= link_to l('Download') => $file->{path}, class => 'filebin download', download => $file->{fname} %>  % if (config->{filebin}->{show_latest}) { <%= link_to l('Latest files') => "/filebin/latest", class => 'filebin latest' %>  % }

% if ($file->{ftype} eq 'i') { <%= image $file->{path} %> % } elsif ($file->{ftype} eq 'a') { <%= tag audio => (src => $file->{path}, controls => 'controls', loop => 0, autoplay => 0) => l('HTML5-aware browser required') %> % } elsif ($file->{ftype} eq 'v') { <%= tag video => (src => $file->{path}, controls => 'controls', loop => 0, autoplay => 0) => l('HTML5-aware browser required') %> % }

% if ($file->{ftype} eq 'i' or $file->{ftype} eq 'v') { % }
<%= l('Name') %>:<%= $file->{fname} %>
<%= l('Size') %>:<%= sprintf("%.1f kb", $file->{fsize} / 1024) %>
<%= l('Mime') %>:<%= $file->{fmime} %>
<%= l('Image size') %>:<%= sprintf("%dx%d", $file->{res_w}, $file->{res_h}) %>