jaydenseric / graphql-multipart-request-spec

A spec for GraphQL multipart form requests (file uploads).
993 stars 54 forks source link

Multipart File Upload #26

Closed ThiruvenkatamR closed 4 years ago

ThiruvenkatamR commented 4 years ago

Hi,

I have my graphql server implemented in apollo. I have my client built using react. I would like to upload files in chunks ie. When a user uploads 3 files to upload, I would like to upload file one by one and in parts. So the first file gets uploaded first in part something similar to first n bytes and next n bytes an so on.

I have followed the above-mentioned format for sending the request. But I facing this issue

BadRequestError: Misordered multipart fields; files should follow ‘map’ (https://github.com/jaydenseric/graphql-multipart-request-spec).

I am not able to debug it. Can you please help me with this?

Thank you. Much appreciated!!!!

jaydenseric commented 4 years ago

It's mostly likely that the error is right; perhaps the fields are in the wrong order?

The first thing you should do is check that the outgoing requests are in the valid format; you can do that by looking at the outgoing request in the chrome network inspector. It allows you to see the multipart form structure in the request body.

Closing because this issue is not to do with the spec itself, but rather an a question about an implementation.