We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Curl error generated by sending multiple files
To Reproduce Steps to reproduce the behavior:
// UploadConfigFileAPI // // @Summary 上传配置文件 // @Tags config // @Accept multipart/form-data // @Produce json // @Param file formData []file true "上传的文件" collectionFormat(multi) // @Param path formData string true "上传文件要存储的位置" // @Success 200 {object} handler.Result{} // @Router /config/file [post] func UploadConfigFileAPI(ctx iris.Context) { handler.WrapperResult(ctx, func() (interface{}, error) { formPath := ctx.FormValue("path") files, headers, err := ctx.FormFiles("files", func(ctx iris.Context, header *multipart.FileHeader) bool { return true }) if err != nil { return nil, errors.WithStack(err) } software := services.NewSoftware() return software.UploadFiles(formPath, files, headers) }) }
swag fmt && swag init
curl -X POST "http://localhost:8080/openapi/v1/config/file" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "files={},{}" -F "path=a"
Expected behavior
curl -X POST "http://localhost:8080/openapi/v1/config/file" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "[email protected]" -F "[email protected]" -F "path=a"
Screenshots
Your swag version e.g. 1.16.3
Your go version e.g. 1.22
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Curl error generated by sending multiple files
To Reproduce
Steps to reproduce the behavior:
swag fmt && swag init
Expected behavior
Screenshots
Your swag version
e.g. 1.16.3
Your go version
e.g. 1.22
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: