CodeGenieApp / CodeGenieApp/serverless-express
both express.static and res.sendFile return wrong binary when serving a zip file
Aperta
- Lingua principale
- JavaScript
- Stelle
- 5.3k
- Fork
- 676
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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:
```ts
app.use("/done/ext.zip", (req, res) => {
res.sendFile(path.join(__dirname, "public/ext.zip"));
});
app.use("/done", express.static("public"));
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.