Skip to content

Node.js based forum software built for the modern web

fix: tests

Julian Lam492cbc62271e
diff --git a/src/posts/uploads.js b/src/posts/uploads.js
index f27f02fbe6..dbfa325168 100644
--- a/src/posts/uploads.js
+++ b/src/posts/uploads.js
@@ -41,7 +41,7 @@ module.exports = function (Posts) {
if (isMainPost) {
const tid = await Posts.getPostField(pid, 'tid');
let thumbs = await topics.thumbs.get(tid);
- thumbs = thumbs.map(thumb => thumb.url.replace(path.join(nconf.get('upload_url'), 'files/'), '')).filter(path => !validator.isURL(path, {
+ thumbs = thumbs.map(thumb => thumb.url.replace(path.join(nconf.get('relative_path'), nconf.get('upload_url'), 'files/'), '')).filter(path => !validator.isURL(path, {
require_protocol: true,
}));
uploads.push(...thumbs);