Skip to content

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

@nick-coremont

Description

@nick-coremont

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions