#Stop Vercel Dynamically Storing Public Files

15 messages · Page 1 of 1 (latest)

lament cradle
#

I have a 'download' button on my app, that references a PDF file in the public directory. This works fine when run locally, however when deployed to vercel it does not.

When trying to access 'http://domain.com/FILENAME' it does not work for this file, but does work for all the other image files stored in the public folder that are used in my app.

I read that Vercel does this on purpose?

Any suggestions?

ivory perchBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

vestal chasm
#

i faced this issue before with a app(it wasn't nextjs, so confirm), I had to add that path to vercel config. you can check out vercel config

lament cradle
vestal chasm
#

I had to set this

    "functions": {
        "api/*": {
            "includeFiles": "docs/**/*"
        }
    }
#

I'm unsure if its same for nextjs.

lament cradle
#

alright, cheers i appreciate the help

vestal chasm
#

please verify if it is working first, and lmk

lament cradle
#

Unfortunately not, as I have no severless functions I'm trying to reference,

vestal chasm
#

Umm, I'll have to check this locally first. will do that tmr and let you know

lament cradle
#

cheers

vestal chasm
#

@lament cradle I tried it, and its working fine for me

#

I'm able to view the PDF after deploying to vercel

vestal chasm
#

@lament cradle

lament cradle