mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: should be able to serve optimized image from local if its ... local...
This commit is contained in:
parent
90eaad336d
commit
eeda367e70
3 changed files with 20 additions and 1 deletions
|
@ -67,7 +67,7 @@ class UserAvatarsController < ApplicationController
|
|||
original = Discourse.store.path_for(upload)
|
||||
if Discourse.store.external? || File.exists?(original)
|
||||
if optimized = get_optimized_image(upload, size)
|
||||
if Discourse.store.external?
|
||||
unless optimized.local?
|
||||
expires_in 1.day, public: true
|
||||
return redirect_to optimized.url
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue