We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Node.js version: v16.20.1
OS version: macOS 13.5.1
Description: the app crashes when attempting to read a file larger than 2GB.. setting config.buffer false.
a file larger than 2GB located in the /public directory can cause the entire app to crash when attempting to read it.
reading it normally.
const Koa = require("koa"); const path = require("path"); const staticCache = require("koa-static-cache"); const app = new Koa(); app.use( staticCache(path.join(__dirname, "public"), { buffer: false, dynamic: true, preload: false, }) ); app.use(async (ctx) => { ctx.body = "Hello World"; }); app.listen(3000);
I suspect the issue may be related to the loadFile function:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Node.js version: v16.20.1
OS version: macOS 13.5.1
Description: the app crashes when attempting to read a file larger than 2GB.. setting config.buffer false.
Actual behavior
a file larger than 2GB located in the /public directory can cause the entire app to crash when attempting to read it.
Expected behavior
reading it normally.
Code to reproduce
Checklist
Other
I suspect the issue may be related to the loadFile function:
The text was updated successfully, but these errors were encountered: