10111: On output collections, name the collection node after the output_uuid reference.
[arvados.git] / apps / workbench / app / helpers / collections_helper.rb
index f310265c960e1bc727e2fe86042da73440b2b069..25f2cb53e620590f9d7f7f2ce31afec4c1c07337 100644 (file)
@@ -54,19 +54,17 @@ module CollectionsHelper
     file_path = "#{f0}#{file[1]}"
   end
 
-
   ##
   # Check if collection preview is allowed for the given filename with extension
   #
   def preview_allowed_for file_name
     file_type = MIME::Types.type_for(file_name).first
-
     if file_type.nil?
       false
     elsif (file_type.raw_media_type == "text") || (file_type.raw_media_type == "image")
       true
     elsif (file_type.raw_media_type == "application") &&
-          (Rails.configuration.filename_suffixes_with_view_icon.include? ((file_name.split('.')[-1]).downcase))
+          (Rails.configuration.application_mimetypes_with_view_icon.include? (file_type.sub_type))
       true
     else
       false