Skip to content

Commit

Permalink
Merge pull request #2533 from uiltondutra/field_type_file_upload_dete…
Browse files Browse the repository at this point in the history
…ct_svg

Add SVG file extension to the image detection method
  • Loading branch information
bbenezech committed Feb 4, 2016
2 parents ec4b8e0 + bf8fb3c commit 1ff702b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rails_admin/config/fields/types/file_upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class FileUpload < RailsAdmin::Config::Fields::Base
end

register_instance_option :image? do
(url = resource_url.to_s) && url.split('.').last =~ /jpg|jpeg|png|gif/i
(url = resource_url.to_s) && url.split('.').last =~ /jpg|jpeg|png|gif|svg/i
end

register_instance_option :allowed_methods do
Expand Down

0 comments on commit 1ff702b

Please sign in to comment.