mirror of
https://github.com/discourse/discourse.git
synced 2025-06-25 01:30:17 +08:00
FIX: allow uploading of category logo and background
This commit is contained in:
@ -22,7 +22,7 @@ class Upload < ActiveRecord::Base
|
||||
validates_with ::Validators::UploadValidator
|
||||
|
||||
CROPPED_TYPES ||= %w{avatar card_background custom_emoji profile_background}.each(&:freeze)
|
||||
UPLOAD_TYPES ||= CROPPED_TYPES + %w{composer}.each(&:freeze)
|
||||
UPLOAD_TYPES ||= CROPPED_TYPES + %w{composer category_logo category_background}.each(&:freeze)
|
||||
|
||||
def thumbnail(width = self.width, height = self.height)
|
||||
optimized_images.find_by(width: width, height: height)
|
||||
|
Reference in New Issue
Block a user