Skip to content

images uploaded to the public/uploads directory show 404 errors #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
fanzjgw opened this issue Mar 24, 2025 · 2 comments
Open

images uploaded to the public/uploads directory show 404 errors #89

fanzjgw opened this issue Mar 24, 2025 · 2 comments

Comments

@fanzjgw
Copy link

fanzjgw commented Mar 24, 2025

hi:
After deploying the build in a production environment, images uploaded to the public/uploads directory show 404 errors in both the file list and upload preview. How can this issue be resolved? Thank you.

@Kiranism
Copy link
Owner

hi: After deploying the build in a production environment, images uploaded to the public/uploads directory show 404 errors in both the file list and upload preview. How can this issue be resolved? Thank you.

Only assets that are in the public directory at build time will be served by Next.js. Files added at runtime won't be available

@fanzjgw
Copy link
Author

fanzjgw commented Mar 28, 2025

If you don’t want to borrow external cloud storage for files uploaded at runtime, and can directly preview them in the system, do you have any good suggestions? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants