diff --git a/client/public/resume.pdf b/client/public/resume.pdf deleted file mode 100644 index 421d651..0000000 Binary files a/client/public/resume.pdf and /dev/null differ diff --git a/client/src/components/Hero/Hero.tsx b/client/src/components/Hero/Hero.tsx index 2bccf1f..5c3a95c 100644 --- a/client/src/components/Hero/Hero.tsx +++ b/client/src/components/Hero/Hero.tsx @@ -251,8 +251,8 @@ const Hero: React.FC = () => { }; const handleResumeDownload = () => { - // Direct link to the resume in the public folder - window.open('/resume.pdf', '_blank'); + // Use full backend URL to avoid frontend routing issues + window.open('http://localhost:5000/api/resume', '_blank'); }; const handleContactScroll = () => { diff --git a/server/server.js b/server/server.js index f207c86..edbbfe9 100644 --- a/server/server.js +++ b/server/server.js @@ -39,7 +39,7 @@ const portfolioData = { phone: "+91 (800) 123-4567", location: "Hyderabad, India", bio: "Passionate full-stack developer specializing in React, Node.js, and database technologies. I craft seamless web and mobile experiences with modern technologies, focusing on clean code and innovative solutions.", - resume: "/assets/resume.pdf", + resume: "/api/resume", profileImage: "/assets/profile-photo.jpg" }, skills: [ @@ -158,6 +158,11 @@ const portfolioData = { }; // Routes +// Serve UpdatedResume.pdf from src/components +app.get('/api/resume', (req, res) => { + const filePath = require('path').resolve(__dirname, '../client/src/components/UpdatedResume.pdf'); + res.sendFile(filePath); +}); app.get('/api/portfolio', (req, res) => { res.json(portfolioData); });