mirror of
https://github.com/discourse/discourse.git
synced 2025-08-21 19:11:18 +08:00
Merge pull request #1275 from ZogStriP/enable-thumbnailing-on-s3
Enable thumbnailing on s3
This commit is contained in:
commit
4f0713b9da
25 changed files with 528 additions and 505 deletions
|
@ -105,7 +105,7 @@ module Discourse
|
|||
|
||||
def self.git_version
|
||||
return $git_version if $git_version
|
||||
f = Rails.root.to_s + "/config/version"
|
||||
f = Rails.root.to_s + "/lib/version"
|
||||
require f if File.exists?("#{f}.rb")
|
||||
|
||||
begin
|
||||
|
@ -122,6 +122,16 @@ module Discourse
|
|||
user
|
||||
end
|
||||
|
||||
def self.store
|
||||
if SiteSetting.enable_s3_uploads?
|
||||
@s3_store_loaded ||= require 'file_store/s3_store'
|
||||
S3Store.new
|
||||
else
|
||||
@local_store_loaded ||= require 'file_store/local_store'
|
||||
LocalStore.new
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def self.maintenance_mode_key
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue