Replies: 1 comment
-
I just ran into this. Before attempting to switch to GraphQL file uploads, I took great care to make sure all of my file uploads were stream processed to avoid using memory or disk space. This is most useful when you are not storing files on the same system as the application (e.g. forwarding them on to S3). One issue is that the Upload object exposes an The larger issue is that But I think for functions that support a single file upload, which would be obvious from the Map, it should be possible to expose the I'm not sure what it takes to actually get the changes approved, but it would be nice. |
Beta Was this translation helpful? Give feedback.
-
gqlgen's file upload support presently depends on http.Request.FormFile, which reads out the entire file into a temporary location, either RAM or on disk. This is more convenient to work with, but for large files, this can introduce a substantial overhead. Users sensitive to these constraints may prefer to use a streaming approach via http.Request.MultipartReader, which should be facilitated by gqlgen.
Beta Was this translation helpful? Give feedback.
All reactions