Preview cache-busting: Cache-Control: no-cache na endpoint + ?v=Date.now() v frontend URL — browser ne sme cachat starega output-a po recutu
This commit is contained in:
@@ -1773,15 +1773,17 @@
|
||||
|
||||
function previewJob(id, title) {
|
||||
// Odpre velik modal z reel videom
|
||||
// Dodaj timestamp cache-buster da browser ne servira starega cached output-a
|
||||
const cacheBust = Date.now();
|
||||
const overlay = document.createElement("div");
|
||||
overlay.className = "modal-overlay";
|
||||
overlay.innerHTML = `
|
||||
<div class="modal-content" onclick="event.stopPropagation()">
|
||||
<button class="modal-close" title="Zapri (ESC)">×</button>
|
||||
<video src="/api/preview/${id}" controls autoplay playsinline></video>
|
||||
<video src="/api/preview/${id}?v=${cacheBust}" controls autoplay playsinline></video>
|
||||
${title ? `<div class="modal-title">${title}</div>` : ""}
|
||||
<div class="modal-actions">
|
||||
<button class="primary" onclick="window.open('/api/download/${id}')">⬇ Prenesi reel</button>
|
||||
<button class="primary" onclick="window.open('/api/download/${id}?v=${cacheBust}')">⬇ Prenesi reel</button>
|
||||
<button onclick="closeModal()">Zapri</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user