Closed georgebv closed 1 year ago
Hi @georgebv, this is similar to a recent issue report in https://github.com/jordaneremieff/mangum/issues/270.
One of the solutions proposed was to re-introduce the text_mime_types
configuration, if you are able to put forward a PR to do this, then I will review and merge.
@jordaneremieff sounds good, I'll link it here once I get to it (~this week). Also, FYI, I am using mangum to deploy a full-blown web app on FastAPI to aws lambda.
Released in 0.16.0.
Issue: I want to serve binary files as is (not base64 encoded) Cause: everything not in
DEFAULT_TEXT_MIME_TYPES
is base64 encoded by default Proposed solution: allow providing additional mime types; suggested options:Mangum(app, extra_text_mime_types=["image/png"])
handler.add_text_mime_types(["image/png"])
This is my current hacky solution to serve png images: