Do uploaded files use absolute links?

When I change my Discourse forum’s host, for instance rename the subdomain, uploaded files stop working. We’re still just testing so the only uploaded files are some avatars, which have now gone missing twice. I found the avatar link in the HTML source:

 PreloadStore.store("topic_list",{"users":[{"id":2,"username":"<some_user_name>","avatar_template":"//<old_forum_address>/uploads/default/avatars/xxx/xxx/xxxxxxxxxx/{size}.jpg"},

I have already updated the host address both in config/discourse.conf and in the forum settings, so I’m wondering if these links are stored with absolute URLs. Is there a way to update these links to use the new hostname? Am I just missing a setting somewhere?

It’s not a big deal in my case, just thought it was interesting and good to note.

One more similar issue after changing hostname.

I got a message saying: There are new user signups waiting to be approved (or rejected) before they can access this forum. Please review them in the admin section.

The link used the old hostname and gave me a 404: http://<old_hostname>/admin/users/list/pending/

Are you running latest? If so, run the avatars:regenerate rake task to fix this :wink:

2 Likes

Yes I am, and it worked. Thank you! :smile: Just had to update rake first.