graphql-python / flask-graphql

Adds GraphQL support to your Flask application.
MIT License
1.32k stars 140 forks source link

Support multipart requests / file uploads #51

Open rshk opened 6 years ago

rshk commented 6 years ago

Requests with multipart/form-data were handled incorrectly, preventing file upload functionality from working.

I fixed GraphQLView to support file uploads according to the specification.

This is currently used in production to receive file uploads via apollo-upload-client.



Haven't really tested on Py2 or <3.6, test suite seems to be happy though.
coveralls commented 6 years ago

Coverage Status

Coverage decreased (-9.3%) to 84.247% when pulling 84583cf410609c9575de96e3a3c69fa44c70a7de on rshk:support-multipart-requests into 4183613bb9bb5ac4e66e066381414a8940cdcbcf on graphql-python:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-9.3%) to 84.247% when pulling 84583cf410609c9575de96e3a3c69fa44c70a7de on rshk:support-multipart-requests into 4183613bb9bb5ac4e66e066381414a8940cdcbcf on graphql-python:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+1.07%) to 94.615% when pulling 9e69073b214ee18e192e5f23a4a30c15ec85a04e on rshk:support-multipart-requests into 4183613bb9bb5ac4e66e066381414a8940cdcbcf on graphql-python:master.

Fenkiou commented 5 years ago

Any update on this?

sabard commented 5 years ago

I've been using graphene-file-upload for now. Code looks to be doing pretty much the same thing as this.

Will be nice to consolidate when this gets merged in.