fix: #9184 proper relative_path usage in topic thumbs.get

v1.18.x
Julian Lam 4 years ago
parent d90c7ff43b
commit 66da6bcd1c

@ -101,7 +101,7 @@
"nodebb-plugin-spam-be-gone": "0.7.7",
"nodebb-rewards-essentials": "0.1.4",
"nodebb-theme-lavender": "5.0.17",
"nodebb-theme-persona": "10.3.17",
"nodebb-theme-persona": "10.3.18",
"nodebb-theme-slick": "1.3.7",
"nodebb-theme-vanilla": "11.3.10",
"nodebb-widget-essentials": "5.0.2",

@ -32,7 +32,7 @@ Thumbs.get = async function (tids) {
}
const hasTimestampPrefix = /^\d+-/;
const upload_url = nconf.get('upload_url');
const upload_url = nconf.get('relative_path') + nconf.get('upload_url');
const sets = tids.map(tid => `${validator.isUUID(String(tid)) ? 'draft' : 'topic'}:${tid}:thumbs`);
const thumbs = await Promise.all(sets.map(set => getThumbs(set)));
let response = thumbs.map((thumbSet, idx) => thumbSet.map(thumb => ({

@ -5,7 +5,7 @@
{{{ each thumbs }}}
<div class="media" data-id="{./id}" data-path="{./url}">
<div class="media-left">
<img class="media-object" src="{config.relative_path}{./url}" />
<img class="media-object" src="{./url}" />
</div>
<div class="media-body">
<p>

Loading…
Cancel
Save