99designs / 99designs/gqlgen

Unable to override MaxUploadSIze for file upload

Ouverte
#2,403 2 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
10.8k
Forks
1.3k
Merge moyen
2 j 36 min
PR mergées (30 j)
26

Description

### What happened?
This is similiar to #1780.

I was trying out the [file upload example](https://github.com/99designs/gqlgen/tree/master/_examples/fileupload) and set the `MaxUploadSize` to 1 GB under [`server/server.go`](https://github.com/99designs/gqlgen/blob/master/_examples/fileupload/server/server.go#L31).

I then uploaded a file with size of 576 MB. The error message was `{"errors":[{"message":"failed to parse multipart form, request body too large"}],"data":null}`.

### What did you expect?
The upload for 576 MB should be successful based on the configuration set.

I tried again with a 31 MB file and the upload was successful. The hard limit seems to be at 32 MB.

### Minimal graphql.schema and models to reproduce
Schema is based from [file upload example](https://github.com/99designs/gqlgen/blob/master/_examples/fileupload/schema.graphql).
```graphql
scalar Upload

type File {
id: Int!
name: String!
content: String!
contentType: String!
}

input UploadFile {
id: Int!
file: Upload!
}

type Mutation {
singleUploadWithPayload(req: UploadFile!): File!
}
```

### versions
- `go run github.com/99designs/gqlgen version`?: v0.17.20
- `go version`?: go1.18.4 linux/amd64

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.