<% if uploaded_file.image? %>
<%= link_to image_tag(uploaded_file.public_filename(:thumb), :alt => uploaded_file.display_title), uploaded_file.view_url %>
<%= image_label(uploaded_file) %> <% else %> <%= render :partial => 'article', :object => uploaded_file %> <% end %>