nestjs / swagger

OpenAPI (Swagger) module for Nest framework (node.js) :earth_americas:
https://nestjs.com
MIT License
1.69k stars 477 forks source link

File upload only displays the string "string($binary)" instead of upload button #2933

Closed w-biggs closed 2 weeks ago

w-biggs commented 6 months ago

Is there an existing issue for this?

Current behavior

After following the official documentation, instead of a file upload button showing in Swagger, just the string "string($binary)" is printed.

image

Minimum reproduction code

https://github.com/w-biggs/repro-nest-swagger-file-upload-bug

Steps to reproduce

  1. npm install
  2. npm run start:dev
  3. Navigate to http://localhost:3001/api

Expected behavior

There is a file upload button.

Package version

7.3.1

NestJS version

9.4.3

Node.js version

21.5.0

In which operating systems have you tested?

Other

No response

qhx0807 commented 3 months ago

tap "Try it out"