Skip to content

Commit 0866e9f

Browse files
committed
use the file extension detection to get the content type of an asset initially registered as a text/x-csrc one
1 parent 7093766 commit 0866e9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/locomotive/carrierwave/asset.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def content_types
3434
def set_content_type_of_model(*args)
3535
content_type = file.content_type
3636

37-
if content_type.blank? || content_type == 'application/octet-stream'
37+
if content_type.blank? || ['application/octet-stream', 'text/x-csrc'].include?(content_type)
3838
content_type = File.mime_type?(original_filename)
3939
end
4040

0 commit comments

Comments
 (0)