Skip to content

Browse button for @RequestBody when mediaType is other than application/octet-stream #515

@jmoraleda

Description

@jmoraleda

I have not figured out how to get the swagger-ui to display a Browse button when my @PostMapping annotation has a consumes attribute with a value other than application/octet-stream.

From the documentation at https://swagger.io/docs/specification/describing-request-body/file-upload/ I have tried to set:

 @RequestBody(content = @Content(schema  = @Schema(format = "binary", type="string"))

but this makes no difference. The moment I set consumes to a value other than application/octet-stream I swagger displays a box to input text instead of a browse button. Am I doing something wrong, or is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions