Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私の状況: RubyOnRails に基づくアプリケーションがあります。画像のアップロードにはCarrierwaveを使用しています。
誤って拡張子を付けずに保存したファイルがたくさんあります。したがって、これらはすべて空の値を持つ content_type を持っています
これらの画像の拡張子を復元する方法はありますか?
ありがとう
あなたも試すことができます
require 'RMagick' puts Magick::Image::read(filename).first.format
ここにドキュメントへのリンクがあります