app/helpers/browse_everything_helper.rb in browse-everything-0.4.5 vs app/helpers/browse_everything_helper.rb in browse-everything-0.5.0
- old
+ new
@@ -6,6 +6,12 @@
hidden_field_tag(key,value)
end
fields.join("\n").html_safe
end
+ def is_acceptable?(file)
+ acceptable = params[:accept] || '*/*'
+ acceptable_types = acceptable.split(/,\s*/)
+ acceptable_types << 'application/x-directory'
+ acceptable_types.any? { |type| Rack::Mime.match?(file.type, type) }
+ end
end