Fix PDF download links — route through Next.js /api/uploads proxy
This commit is contained in:
parent
8d82ec46d3
commit
82e17d3aa9
1 changed files with 2 additions and 4 deletions
|
|
@ -83,8 +83,6 @@ export default async function MinutesPage() {
|
|||
return da > db ? -1 : 1;
|
||||
});
|
||||
const memberCount = docs.filter((d) => !d.isPublic).length;
|
||||
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL ?? '';
|
||||
|
||||
return (
|
||||
<div className="bg-color-bg">
|
||||
{/* Hero */}
|
||||
|
|
@ -130,9 +128,9 @@ export default async function MinutesPage() {
|
|||
{formatDate(doc.meetingDate)}
|
||||
</span>
|
||||
)}
|
||||
{doc.filePath && backendUrl && (
|
||||
{doc.filePath && (
|
||||
<a
|
||||
href={`${backendUrl}/${doc.filePath}`}
|
||||
href={`/api/uploads/${doc.filePath.replace(/^uploads\//, '')}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="card-link text-sm font-medium underline whitespace-nowrap"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue