swagger-api / swagger-api/swagger-ui

Does not support multiple files

Open
#5,738 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Hi,
Anybody give me some solution to my problem??
I tried with uploading multiple Multipart File. I sending the params like this List & MultipartFile[]. But it doesn't work, I'm getting this error.

" Failed to Parse Multipart servlet , the request doesn't contain a multipart/formData or multipart/mixed, the content-type header is application/json"

Swagger Version : 2.9.2
(both swaggerfox & swagger -ui)

@RequestMapping(value = "/createStudent" ,method = RequestMethod.POST, consumes= { MediaType.MULTIPART_FORM_DATA_VALUE})

And also MultipartFile and @RequestBody bot not working together. So I changed my Body to String and convert to JSON format.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names Swagger UI 2.9.2 but no source files or tests. Start by reproducing the request with multiple MultipartFile parameters and inspect the generated multipart request and content type. Done means multiple files are supported without the request becoming application/json, including the reported body combination.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, openapi
Domain
api, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.