apollographql / apollo-studio-community

🎡  GraphQL developer portal featuring an IDE (Apollo Explorer), auto-documentation, metrics reporting, and more. This repo is for issues, feature requests, and preview docs. 📬
https://studio.apollographql.com
248 stars 29 forks source link

Apollo sandbox file upload feature `application/octet-stream` mimetype #251

Open andres-granda-sungage opened 1 year ago

andres-granda-sungage commented 1 year ago

What type of feedback is this?

Context

I'm testing the File Upload feature in Apollo sandbox

Screenshot 2023-08-23 at 12 15 40 PM

Everything looks good except that Apollo sandbox is sending the wrong mimetype application/octet-stream.

We are following the GraphQL multipart request spec

In our server we get the file but with the wrong mimetype

filePromise: Promise {
  {
    filename: 'pdf_file.pdf',
    mimetype: 'application/octet-stream',
    encoding: '7bit',
    createReadStream: [Function: createReadStream]
  }
}
filePromise: Promise {
  {
    filename: 'png_file.png',
    mimetype: 'application/octet-stream',
    encoding: '7bit',
    createReadStream: [Function: createReadStream]
  }
}

When we use Apollo client with any front end application we don't have this issue.

If we do the same request using Postman for example everything works perfect too.

So this is something that is happening only with Apollo sandbox we are missing some configuration in Apollo sandbox to send the right mimetype or this could be a bug?

impsdc commented 4 months ago

@andres-granda-sungage Have you find a workaround for this ?

andres-granda-sungage commented 4 months ago

Hi @impsdc, sorry no, I can not test file uploads using Apollo sandbox. I still use Postman for that case or any of my front end apps configured with Apollo Client