Fix shareable link!

This commit is contained in:
2026-03-22 16:34:34 +11:00
parent 7a7dedab88
commit e0c1e75b45
+1 -1
View File
@@ -601,7 +601,7 @@ function fileRow(pk, isPublic, expiresAt, publicUrl) {
},
formatExpiry(dt) { return dt ? new Date(dt).toLocaleDateString() : ''; },
copyPublicUrl() {
const url = location.origin + this.publicUrl;
const url = this.publicUrl.startsWith('http') ? this.publicUrl : location.origin + this.publicUrl;
const el = document.createElement('textarea');
el.value = url; el.style.cssText = 'position:fixed;opacity:0';
document.body.appendChild(el); el.select(); document.execCommand('copy'); document.body.removeChild(el);