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

Multiple files: mistake in example code #205

Open
qubing opened this issue Oct 27, 2022 · 3 comments
Open

Multiple files: mistake in example code #205

qubing opened this issue Oct 27, 2022 · 3 comments

Comments

@qubing
Copy link

qubing commented Oct 27, 2022

The method of getting file array from request form is wrong.

files := form.File["upload[]"]
->
files := form.File["upload"]

@lawxen
Copy link
Contributor

lawxen commented Mar 30, 2023

I have test this is not a mistake, Maybe you missed that the example curl file name is "upload[]"

curl -X POST http://localhost:8080/upload \
  -F "upload[]=@/Users/appleboy/test1.zip" \
  -F "upload[]=@/Users/appleboy/test2.zip" \
  -H "Content-Type: multipart/form-data"

image

@lawxen
Copy link
Contributor

lawxen commented Mar 30, 2023

So we should close this issue

@gantoho
Copy link

gantoho commented Sep 23, 2023

This is related to the Key of the parameter passed
image

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

3 participants