We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83631f4 commit 36e18d8Copy full SHA for 36e18d8
lib/fog/storage/google_json/requests/put_object.rb
@@ -48,14 +48,9 @@ def put_object(bucket_name,
48
**options)
49
if data.is_a?(String)
50
data = StringIO.new(data)
51
- end
52
-
53
- unless options[:content_type]
54
- options[:content_type] = "text/plain"
55
56
- if data.is_a?(::File)
57
- options[:content_type] = Fog::Storage.parse_data(data)[:headers]["Content-Type"]
58
+ options[:content_type] ||= "text/plain"
+ elsif data.is_a?(::File)
+ options[:content_type] ||= Fog::Storage.parse_data(data)[:headers]["Content-Type"]
59
end
60
61
# Paperclip::AbstractAdapter
0 commit comments