You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created a backend API. Everything works, the request returns a valid PNG image which I can access it, view it and download it through e.g. Postman.
I am trying to download this image from the API call directly to the user downloads when the user clicks a button. The API call is being called successfully, I can see the successful API call and the image returned through the web developers network tab. However, the downloaded image is not a valid PNG, downloaded from the openapi client the image has less bytes that the original one. I tried almost everything, decoding, etc. I tried to fix the client but without any success.
Changed also the openapi schema responses for the PNG download to this:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
Created a backend API. Everything works, the request returns a valid PNG image which I can access it, view it and download it through e.g. Postman.
I am trying to download this image from the API call directly to the user downloads when the user clicks a button. The API call is being called successfully, I can see the successful API call and the image returned through the web developers network tab. However, the downloaded image is not a valid PNG, downloaded from the openapi client the image has less bytes that the original one. I tried almost everything, decoding, etc. I tried to fix the client but without any success.
Changed also the openapi schema responses for the PNG download to this:
"responses": { "200": { "description": "PNG bytes", "content": { "image/png": { "schema": { "type": "string", "format": "binary" } } } },
Operating System
Windows
Operating System Details
Windows running docker desktop.
Python Version
3.10.18
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions