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

Fail to upload file #2934

Open
KingWu opened this issue Feb 16, 2024 · 4 comments
Open

Fail to upload file #2934

KingWu opened this issue Feb 16, 2024 · 4 comments

Comments

@KingWu
Copy link

KingWu commented Feb 16, 2024

What happened?

Upgrade from 0.13.0 to 0.17.44 and go from 1.16 to 1.22

What did you expect?

Can upload file previously,
but right now throw the following issue

{
	"errors": [
		{
			"message": "failed to parse multipart form"
		}
	],
	"data": null
}

The request body show follow

 POST /portal?lang=en_US HTTP/1.1
> Host: localhost:8080
> User-Agent: insomnia/8.6.1
> Content-Type: multipart/form-data; boundary=X-INSOMNIA-BOUNDARY
> Authorization: Bearer xxxxxxxxxx
> Accept: */*
> Content-Length: 3021

| --X-INSOMNIA-BOUNDARY
| Content-Disposition: form-data; name="operations"
| {"query":"mutation ($file: Upload!) .........
| --X-INSOMNIA-BOUNDARY
| Content-Disposition: form-data; name="map"
| {"0":["variables.file"]}
| --X-INSOMNIA-BOUNDARY
| Content-Disposition: form-data; name="0"; filename="logo.svg"
| Content-Type: image/svg+xml
| <svg width="110" height="44" viewBox="0 0 110 44" ............
| --X-INSOMNIA-BOUNDARY--

versions

  • go run github.com/99designs/gqlgen version? 0.17.44
  • go version? 1.22
@KingWu
Copy link
Author

KingWu commented Feb 18, 2024

Try different go version with gqlgen version

gqlgen v0.17.33 with go v1.18 => Not work
gqlgen v0.17.10 with go v1.16 => Not work
gqlgen v0.17.0 with go v1.16 => Not work

@KingWu
Copy link
Author

KingWu commented Feb 18, 2024

gqlgen v0.16.0 with go v1.16 => Work

gqlgen upgrade to v0.17.x will cause upload fail issue

@UnAfraid
Copy link
Contributor

UnAfraid commented Feb 18, 2024

Have you tried apollo upload client?

@KingWu
Copy link
Author

KingWu commented Feb 20, 2024

i did't use apollo as my client. For gqlgen, after 0.17.0, it assume the client is using apollo client?

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

2 participants