Feature request · API & developer experience · Blocks work
Allow reading files from API routes and pages
1 source thread · first seen 2019-08
Summary
Calling fs.readFile with a __dirname-based path in an API route does not work, and the user wants it to work in both development and production.
- Affects
- Next.js developer
Evidence
Excerpts are copied word for word from the source; follow the link to read it in full.
“It's currently not possible to read files from API routes or pages”