Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

CustomStyle uses this uploader and doesn't have a content_type method.

Markus Kahl2cab0bedd7a8
diff --git a/app/uploaders/fog_file_uploader.rb b/app/uploaders/fog_file_uploader.rb
index bde1916211b..65a55297fd8 100644
--- a/app/uploaders/fog_file_uploader.rb
+++ b/app/uploaders/fog_file_uploader.rb
@@ -60,7 +60,7 @@ class FogFileUploader < CarrierWave::Uploader::Base
##
# This is necessary for carrierwave to set the Content-Type in the S3 metadata for instance.
def fog_attributes
- content_type = model.content_type
+ content_type = model.respond_to?(:content_type) ? model.content_type : ""
return super if content_type.blank?