Skip to content

Support file downloads#46

Open
mithodin wants to merge 4 commits into
ajaishankar:mainfrom
mithodin:support_file_downloads
Open

Support file downloads#46
mithodin wants to merge 4 commits into
ajaishankar:mainfrom
mithodin:support_file_downloads

Conversation

@mithodin

Copy link
Copy Markdown

I am using this software on a project where for some endpoints, we receive a PDF or image file in response. The current response handling in openapi-typescript-fetch makes it hard to extract the file from the response.

I propose that (instead of adding some heuristic for what is binary data and what is not), the user should be able to specify which mime types to handle as binary data and return response.blob() in the data property. This also solves issue #10.

Happy to improve upon this code in any way neccessary in order to get it merged.

@mithodin mithodin force-pushed the support_file_downloads branch from 4d1c23e to 2d30c5c Compare September 23, 2022 07:24
@voxpelli

Copy link
Copy Markdown

Neat, I did for the reverse flow now: #50

@Rendez Rendez mentioned this pull request Apr 20, 2023
@renanzulian

Copy link
Copy Markdown

I'm facing the same problem here.

@Ryan-LT

Ryan-LT commented May 12, 2024

Copy link
Copy Markdown

Same problem here. No way to parse to blob file before making a downloadable file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants