Skip to content

Commit

Permalink
Fix attachment URLs.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoVink committed Jan 7, 2025
1 parent fdeba03 commit 34f1d4b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions web/app/(main)/emails/components-client.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ import ClientOnly from '@/components/clientonly';
import './email.css';


const handleDownload = async (uri, name) => {
const handleDownload = async (path, name) => {
// Download as blob
const response = await fetch(uri, { method: 'GET' });
const url = `https://static.jackievink.com/${path}`;
const response = await fetch(url, { method: 'GET' });
if (!response.ok) {
console.error('Failed to download file');
return;
}
const blob = await response.blob();

// Create and click a link element
Expand Down

0 comments on commit 34f1d4b

Please sign in to comment.