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']
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 theMultipart Request Spec
, hence the additional check.Another proof is how Graphene Django handles this content type natively, using
request.POST
instead ofrequest.POST['operations']
https://github.com/graphql-python/graphene-django/blob/c049ab7470d947594e9e947a8dbde3f76fb07951/graphene_django/views.py#L274