flask-graphql icon indicating copy to clipboard operation
flask-graphql copied to clipboard

Support multipart requests / file uploads

Open rshk opened this issue 7 years ago • 5 comments

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.

rshk avatar Jul 24 '18 21:07 rshk

Coverage Status

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

coveralls avatar Jul 24 '18 21:07 coveralls

Coverage Status

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

coveralls avatar Jul 24 '18 21:07 coveralls

Coverage Status

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

coveralls avatar Jul 24 '18 21:07 coveralls

Any update on this?

Fenkiou avatar Mar 18 '19 15:03 Fenkiou

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.

sabard avatar Aug 02 '19 19:08 sabard