I'm not able to download pdf after site goes Live ?Why?

I have added a pdf file but on downloading it says “Couldn’t Download. No file”
The project is connected with Git repo and the site link is:-

https://shubhsportfolio.netlify.app/

Thanks for the help.

@shubhm You can download the resulting files of your build and see if the PDF is in there:

If it is, then the issue may be the filename/link.

If it isn’t, then the issue may be that your build doesn’t have the PDF in the Publish directory when the files are deployed.

1 Like

I have downloaded the deploy log .

"static/media/Shubham_CV.e50393ac.pdf": “/static/media/Shubham_CV.e50393ac.pdf”,
“static/media/address.a01cb8cc.png”: “/static/media/address.a01cb8cc.png”,
“static/media/av5.bfc47b62.png”: “/static/media/av5.bfc47b62.png”,
“static/media/email.a49e0158.png”: “/static/media/email.a49e0158.png”

And sure enough, if you go to that location the file is there:

If you run your build locally, by doing an npm run build, then check the output folder (the one you have set as your Publish directory), you will see the same thing.

1 Like

I’m unfamiliar with codesandbox, but even if you’re using a “no/low code” solution, it’s ultimately still a React based site (as it says in the title tag):
image

So it’s still getting built somewhere along the line, even if you aren’t the one that has explicitly configured the command being run.

Your PDF file was in the location linked when I posted, but I’d hazard a guess that you’ve done another deployment and you’ve either removed the file, or the hash generated against it has changed from e50393ac to something else.

I still have the file open in my browser at the location your previous build log mentioned…

Whatever the issue is, it’s not a Netlify one, it’s down to your build, (even if you aren’t the one setting it up entirely), you need to ensure that it’s configured in a way where the file ends up where you expect it to end up.

1 Like

@nathanmartin I have resolved the issue. Thanks for helping me out Nathan.
I really appreciate it :+1:

1 Like

No problem at all, best of luck on your future projects!

1 Like