Add download attribute to download link to prevent inline viewing

This commit is contained in:
James 2026-02-12 17:29:48 -05:00
parent f59c12e25c
commit 99b39ee737
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@
Share
</button>
{{if .Document.PDFPath}}
<a href="/pdf/{{.Document.ID}}?download=1" class="inline-flex items-center px-3 py-2 bg-brand-600 hover:bg-brand-700 text-white text-sm font-medium rounded-lg transition-all">
<a href="/pdf/{{.Document.ID}}?download=1" download="{{.Document.Title}}" class="inline-flex items-center px-3 py-2 bg-brand-600 hover:bg-brand-700 text-white text-sm font-medium rounded-lg transition-all">
<svg class="w-4 h-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
</svg>