Skip to content
New issue

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

upload multi file is wrong #866

Open
ghost opened this issue Jan 8, 2021 · 5 comments
Open

upload multi file is wrong #866

ghost opened this issue Jan 8, 2021 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 8, 2021

upload multi file is wrong


// @Summary 多文件上传
// @Security ApiKeyAuth
// @Description | 参数 | 说明 |备注|
// @Description | :-----: | :----: | :----: |
// @accept x-www-form-urlencoded
// @Tags  admin
// @version 1.0
// @Param file formData []file true "文件" collectionFormat(multi)
// @success 200 object utils.JSONResult{} "成功"
// @Router /admin/v1/upload/multi [POST]

2021/01/08 11:34:52 ParseComment error in file app/http/controllers/admins/upload_controller.go :file is not supported array type for formData


@ubogdan
Copy link
Contributor

ubogdan commented Feb 5, 2021

If you made a variable var files []file somewhere this file does your code still compile :) .

@fr3fou
Copy link

fr3fou commented Jul 30, 2021

Is there a solution to this yet?

@padurean
Copy link

I also stumbled upon the same problem.
Is there a solution for this?

@MuhammedOzdogan
Copy link

What's the current status of this feature?
#1332 is merged but []file does nothing different than file or I couldn't manage to make it work in my local machine.
Any change to update documentation, I would appreciate if anyone adds an example under /example dir

@SeanTolstoyevski
Copy link

SeanTolstoyevski commented Mar 1, 2024

We are also wondering what the status of this issue is.

We have APIs for users to upload multiple files, but only a single file can be selected from the swagger web interface.

If there is no solution for this issue, you can at least explain what the problem is and encourage a developer to solve it.

example swagger docs:

// .......................
// @Tags Attachment
// @Accept  multipart/form-data
// @Produce  json
// @Security BearerAuth
// @Param files formData file true "....."
// @Param is_private query string true "..."
// @Param folder query string true "..."
// @Success 200 {array} models.AWSContent "...."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants