lmcgartland / graphene-file-upload

Enhances Graphene Django GraphQL Server for intuitive file uploads via GraphQL mutations.
MIT License
287 stars 50 forks source link

Use graphene_django if `operations` not in request POST #45

Closed lucas-bremond closed 3 years ago

lucas-bremond commented 3 years ago

This is simply correcting the typo in https://github.com/lmcgartland/graphene-file-upload/pull/37.

Indeed, the content type being multipart/form-data is not a sufficient condition to prove that the request is following the Multipart Request Spec, hence the additional check.

Another proof is how Graphene Django handles this content type natively, using request.POST instead of request.POST['operations']

https://github.com/graphql-python/graphene-django/blob/c049ab7470d947594e9e947a8dbde3f76fb07951/graphene_django/views.py#L274

lmcgartland commented 3 years ago

@lucas-bremond I'll try to get this reviewed this week along with the notes from #37 Thanks for opening a PR!

lucas-bremond commented 3 years ago

@lmcgartland Any chance this will be tagged / released soon? :)