mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 20:44:40 +08:00
BUGFIX: we should not store absolute urls for locally uploaded avatar templates
Highly recommended to run: `RAILS_ENV=production bundle exec rake avatars:regenerate` to fix the avatar templates stored in the database.
This commit is contained in:
@ -122,10 +122,10 @@ describe FileStore::LocalStore do
|
||||
store.external?.should == false
|
||||
end
|
||||
|
||||
describe ".absolute_avatar_template" do
|
||||
describe ".avatar_template" do
|
||||
|
||||
it "is present" do
|
||||
store.absolute_avatar_template(avatar).should == "http://test.localhost/uploads/default/avatars/e9d/71f/5ee7c92d6d/{size}.jpg"
|
||||
store.avatar_template(avatar).should == "/uploads/default/avatars/e9d/71f/5ee7c92d6d/{size}.jpg"
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -113,10 +113,10 @@ describe FileStore::S3Store do
|
||||
store.internal?.should == false
|
||||
end
|
||||
|
||||
describe ".absolute_avatar_template" do
|
||||
describe ".avatar_template" do
|
||||
|
||||
it "is present" do
|
||||
store.absolute_avatar_template(avatar).should == "//s3_upload_bucket.s3.amazonaws.com/avatars/e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98/{size}.jpg"
|
||||
store.avatar_template(avatar).should == "//s3_upload_bucket.s3.amazonaws.com/avatars/e9d71f5ee7c92d6dc9e92ffdad17b8bd49418f98/{size}.jpg"
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user