Replies: 1 comment 1 reply
-
My experience is the same as yours, anything not present in the public folder at build time is not visible at runtime. So you can't just drop extra files into the /.output/public folder like you could on a 'normal' webserver. That said, You also don't mention what you want to do with these images i.e. some form of gallery pages? a pageable API to retrieve a number of images could be the answer for this kind of thing. Just my 2p, take this as you wish. |
Beta Was this translation helpful? Give feedback.
-
I do not know whether this is a feature request, an issue or a misunderstanding. Despite the doc says that:
All assets added in the public/ directory after build are not served and requests lead to 404 errors in production
Is there a way for that behavior to be corrected?
It works as expected in a development environment in Nuxt 3
In order to avoid an XY Problem situation, I can explain what I am actually trying to achieve: user upload of images is part of a Nuxt app I am developing (and for which I would like to self-host everything (i.e. not depend on external providers)). I was thinking to simply save these images in the public/ directory so that the new ones can be served as well as the old ones already in the public/ directory at build time. A few questions arise:
/public
, e.g./.output/public/images
. Is that stupid?Thanks a lot for your help
Beta Was this translation helpful? Give feedback.
All reactions