railsadminteam / rails_admin

RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data
MIT License
7.87k stars 2.25k forks source link

fix images detection issues for file_upload types #3633

Closed Laith-jalal closed 4 days ago

Laith-jalal commented 1 year ago

This PR fixes an issue for the FileUpload type especially for the :image? instance_option, some file uploading Gems add a query string part to the file/image URL, paperclip for example adds timestamp value to the file's URL and in the current implementation having query string will result in NOT considering the file as an image even when it's an image

coveralls commented 1 year ago

Coverage Status

coverage: 95.866% (+0.001%) from 95.865% when pulling d209b871ea150f44187cba3f1cd6034da81ca750 on Laith-jalal:fix_file_upload_images_detection_issue into 647347c48de65b49f8f63a767289484599f7b638 on railsadminteam:master.

mshibuya commented 4 days ago

Thank you for the PR, but the issue was fixed a bit differently: https://github.com/railsadminteam/rails_admin/commit/35c8702351aa300bddcc950d36d68b80742f5011