mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: mixed local s3 store missing avatars
This commit is contained in:
parent
e483176006
commit
97f03e699d
2 changed files with 7 additions and 4 deletions
|
@ -23,11 +23,10 @@ class OptimizedImage < ActiveRecord::Base
|
|||
return thumbnail unless thumbnail.nil?
|
||||
|
||||
# create the thumbnail otherwise
|
||||
original_path = if Discourse.store.external?
|
||||
original_path = Discourse.store.path_for(upload)
|
||||
if original_path.blank?
|
||||
external_copy = Discourse.store.download(upload)
|
||||
external_copy.try(:path)
|
||||
else
|
||||
Discourse.store.path_for(upload)
|
||||
original_path = external_copy.try(:path)
|
||||
end
|
||||
|
||||
if original_path.blank?
|
||||
|
|
|
@ -126,6 +126,10 @@ end
|
|||
|
||||
class FakeExternalStore
|
||||
|
||||
def path_for(upload)
|
||||
nil
|
||||
end
|
||||
|
||||
def external?
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue