azure-function-express
azure-function-express copied to clipboard
fix : 2.0 seems to have broken static file serving on azure. #21
for raw file data download and send
like below if "encoding" value set to "binary" then not doing body.toString() in convertToBody function
app.get("/api/getfile", function (req, res) {
const data = fs.readFileSync("sample.pdf");
res.writeHead(200, {
"Content-Type": "application/pdf",
"Content-Disposition": "attachment;filename=output.pdf"
});
res.end(data, "binary");
});
Codecov Report
Merging #30 into master will not change coverage. The diff coverage is
100%.
@@ Coverage Diff @@
## master #30 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 4 4
Lines 67 67
Branches 18 18
=====================================
Hits 67 67
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/OutgoingMessage.js | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 2bd9041...7860bc5. Read the comment docs.