I'm developing an app with React.js and I'm trying to host some pdf files on amplify, when I try to run it on localhost/3000 it works perfectly, I can read the pdf file like normal, new tab or embedded with html. But after I pushed it to github to run it on Amplify, I can't seem to access the pdf file anymore, neither embedded nor opening a new tab works.
First I import my resume in with Javascript
import myResume from '../assets/Lam-Dec-24.pdf'
Then I tried
<a href={myResume} style={{ color: "#1c1c1e" }} rel="noopener noreferrer" target="_blank">
<embed src={myResume} width="100%" height="1500px" />
I even moved the pdf files to the public folder and then I tried these with
src="%PUBLIC_URL%/Lam-Dec-24.pdf"
However nothing seems to work, and console doesn't throw any error whatsoever. Any suggestions on how to solve this?