From 492cbc62271ee8eb5955cab84cf01749d297189e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 4 Feb 2021 14:34:51 -0500 Subject: [PATCH] fix: tests /cc @pitaj --- src/posts/uploads.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);