rootstrap / active-storage-base64

Base64 support for ActiveStorage
https://rootstrap.com
MIT License
160 stars 16 forks source link

[Bug] file extension not saved #67

Open yo-gen opened 3 years ago

yo-gen commented 3 years ago

Bug report:

I think a way for this might be to identify the extension from the file content_type using:

require 'rack/mime'
extension = Rack::Mime::MIME_TYPES.invert[attachment[:content_type]]
filename += extension