FEATURE: generate (avatar) thumbnails in a background task

FIX: keep the "uploading..." indicator until the server replies via the MessageBus
FIX: text was disapearing when uploading an avatar

PERF: always use a region for S3 (defaults to 'us-east-1')
FEATURE: ApplyCDN middleware when using S3
FIX: use the same pattern to store files on S3 and locally
PERF: keep a local cache of uploads when generating thumbnails
FEATURE: migrate_to_s3 rake task
This commit is contained in:
Régis Hanol
2015-05-25 17:59:00 +02:00
parent 675e2c6e13
commit bb0c2813ac
22 changed files with 303 additions and 94 deletions

View File

@ -78,6 +78,10 @@ module Discourse
@anonymous_top_menu_items ||= Discourse.anonymous_filters + [:category, :categories, :top]
end
def self.avatar_sizes
@avatar_size ||= Set.new(SiteSetting.avatar_sizes.split("|").map(&:to_i))
end
def self.activate_plugins!
all_plugins = Plugin::Instance.find_all("#{Rails.root}/plugins")