-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
question: If my API already has a base64-encoded PNG, how ought it return it? #283
Comments
@jrobbins-LiveData I can provide some general information, but would need more details to say much more. The decoding is done by the maybe_encode_body function based on the value of |
Here's a more concrete version of my question. First, here's where the base64 feature works perfectly. Using pypdf, for example, I can merge some PDF files, in memory, and simply return a FastAPI
In a different route, I need to return a screenshot from a Selenium embedded browser using this api. If I get the screenshot as bytes, then the code is equivalent to the PDF example:
But, suppose for performance reasons, I need to call get_screenshot_as_base64 instead of get_screenshot_as_png?
The ALB
How would I use the handler subclass technique you referred to in order to solve this? |
It's impossible to handle right now, as |
One API endpoint I have receives a base64-encoded PNG. Can I return the data via mangum with content-type
image/png
without having to first base64-decode it?The text was updated successfully, but these errors were encountered: