##
# 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
##
# 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
elsif (file_type.raw_media_type == "text") || (file_type.raw_media_type == "image")
true
elsif (file_type.raw_media_type == "application") &&
elsif (file_type.raw_media_type == "text") || (file_type.raw_media_type == "image")
true
elsif (file_type.raw_media_type == "application") &&