diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 92fa01e8f..5b2acc8ab 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -82,6 +82,6 @@ private
     if content_type.blank?
       content_type = Redmine::MimeType.of(attachment.filename)
     end
-    content_type
+    content_type.to_s
   end
 end