1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Wait on Marcel for now

This commit is contained in:
David Heinemeier Hansson 2017-07-04 18:44:06 +02:00
parent 44b8ac48e3
commit 8dc2542721

View file

@ -13,8 +13,9 @@ class ActiveFile::Blob < ActiveRecord::Base
class << self
def build_after_upload(io:, filename:, content_type: nil, metadata: nil)
new.tap do |blob|
blob.content_type = content_type # Marcel::MimeType.for(data, name: name, declared_type: content_type)
blob.filename = filename
blob.content_type = content_type
blob.upload io
end
end