Skip to content
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

both express.static and res.sendFile return wrong binary when serving a zip file #677

Open
yspreen opened this issue Mar 30, 2024 · 1 comment

Comments

@yspreen
Copy link

yspreen commented Mar 30, 2024

I'm not using any middleware except express.json and cors.

this is lambda.ts

import serverlessExpress from "@codegenie/serverless-express";
import app from "./app";
exports.handler = serverlessExpress({
  app,
  binaryMimeTypes: ["application/x-zip", "application/zip"],
});

I tried with and without specifying binaryMimeTypes and with and without the specific first route:

app.use("/done/ext.zip", (req, res) => {
  res.sendFile(path.join(__dirname, "public/ext.zip"));
});
app.use("/done", express.static("public"));
@yspreen
Copy link
Author

yspreen commented Mar 30, 2024

"@codegenie/serverless-express": "^4.14.0",
"express": "^4.19.2",

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

1 participant