<% if @ext == 'pdf' %> <%= render partial: 'archives/viewer' %> <% else %> <%=@filename%>

<%=@filename%>

<% if @ext != "png" && @ext != "jpg" && @ext != "bmp" %> <%=@filename%> <% else %> <%=@filename%> <% end %> <% end %>