How to serv file in public folder by url ? Next.js 14.2.13
Answered
Ojos Azules posted this in #help-forum
Ojos AzulesOP
I want some files in my public folder to be accessible by url like this one file in my public folder test.jar accessbile directly using mysite.com/test.jar or mysite.com/public/test.jar, now when i navigate to it, they are not accessible.
9 Replies
@Ojos Azules I want some files in my public folder to be accessible by url like this one file in my public folder test.jar accessbile directly using mysite.com/test.jar or mysite.com/public/test.jar, now when i navigate to it, they are not accessible.
usually u put your public folder outside of the src
Answer
show me your project setup
Ojos AzulesOP
It is outside
Ojos AzulesOP
your public folder needs to be in root
move it outside of src
Ojos AzulesOP
Oh thank you i thought it was but not, you're right
u can mark my answer as solution, thanks 👍