Skip to content
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

Download link missing for payloads that are not application/octet-stream #9298

Closed
nick-coremont opened this issue Oct 11, 2023 · 3 comments · Fixed by #9343
Closed

Download link missing for payloads that are not application/octet-stream #9298

nick-coremont opened this issue Oct 11, 2023 · 3 comments · Fixed by #9343

Comments

@nick-coremont
Copy link

nick-coremont commented Oct 11, 2023

Q&A (please complete the following information)

  • OS: Windows
  • Browser: chrome
  • Version: latest
  • Method of installation: From NSwag
  • Swagger-UI version: latest
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

This PR, https://github.com/swagger-api/swagger-ui/pull/8579/files, caused a regression for payloads that are not application/octet-stream.

For example, given these Response Headers:

Content-Disposition: attachment; filename=users.csv; filename*=UTF-8''users.csv
Content-Length: 6460682
Content-Type: text/csv

the type of content on this line is string, and therefore content.size === undefined.

Screenshots

image

@char0n
Copy link
Member

char0n commented Nov 9, 2023

I can confirm, you're absolutely right! Thank you for catching this.

char0n pushed a commit that referenced this issue Nov 9, 2023
…string responses (#9343)

Co-authored-by: Vladimír Gorej <vladimir.gorej@gmail.com>

Refs #9298
@char0n
Copy link
Member

char0n commented Nov 9, 2023

Closed by #9343

1 similar comment
@char0n
Copy link
Member

char0n commented Nov 9, 2023

Closed by #9343

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

Successfully merging a pull request may close this issue.

2 participants