make project file tokens public; keep name links with image preview and file download
This commit is contained in:
+2
-2
@@ -115,8 +115,8 @@ function filesHTML(files) {
|
||||
if (!files || !files.length) return '';
|
||||
return `<div class="entry-files">${files.map(f =>
|
||||
isImageFile(f.name)
|
||||
? `<a class="f-img" href="${API}/api/files/${f.token}" target="_blank" title="${esc(f.name)}"><img src="${API}/api/files/${f.token}" alt="${esc(f.name)}"></a>`
|
||||
: `<a class="f-link" href="${API}/api/files/${f.token}" download title="${esc(f.name)}"><span>${esc(f.name)}</span></a>`
|
||||
? `<a class="f-link" href="${API}/api/files/${f.token}" target="_blank" title="Открыть">${esc(f.name)}</a>`
|
||||
: `<a class="f-link" href="${API}/api/files/${f.token}" download title="Скачать">${esc(f.name)}</a>`
|
||||
).join('')}</div>`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user