Fix FileBin file links over p2p

timelapse-frames-through-websocket
Moe 2022-07-05 07:46:05 -07:00
parent e8a11b7b12
commit 39d99d0c95
1 changed files with 3 additions and 2 deletions

View File

@ -75,6 +75,7 @@ $(document).ready(function(e){
} }
], ],
data: data.files.map((file) => { data: data.files.map((file) => {
var href = getApiPrefix('fileBin') + '/' + selectedMonitor + '/' + file.name
return { return {
monitorName: `<b>${loadedMonitors[file.mid]?.name || file.mid}</b>`, monitorName: `<b>${loadedMonitors[file.mid]?.name || file.mid}</b>`,
name: file.name, name: file.name,
@ -85,8 +86,8 @@ $(document).ready(function(e){
`, `,
size: convertKbToHumanSize(file.size), size: convertKbToHumanSize(file.size),
buttons: ` buttons: `
<a class="btn btn-sm btn-primary" href="${file.href}" download title="${lang.Download}"><i class="fa fa-download"></i></a> <a class="btn btn-sm btn-primary" href="${href}" download title="${lang.Download}"><i class="fa fa-download"></i></a>
${file.details.video ? `<a class="btn btn-sm btn-primary preview-video" href="${file.href}" title="${lang.Play}"><i class="fa fa-play"></i></a>` : ``} ${file.details.video ? `<a class="btn btn-sm btn-primary preview-video" href="${href}" title="${lang.Play}"><i class="fa fa-play"></i></a>` : ``}
`, `,
} }
}) })