lib/carrierwave/storage/sftp.rb in carrierwave-ftp-0.4.0 vs lib/carrierwave/storage/sftp.rb in carrierwave-ftp-0.4.1

- old
+ new

@@ -67,11 +67,11 @@ file.close content end def content_type - @content_type || file.content_type + @content_type || inferred_content_type end def content_type=(new_content_type) @content_type = new_content_type end @@ -82,9 +82,13 @@ end rescue end private + + def inferred_content_type + SanitizedFile.new(path).content_type + end def use_ssl? @uploader.sftp_url.start_with?('https') end