Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks
andres-granda-sungage opened this issue Aug 23, 2023 · 2 comments
Open
2 tasks

Comments

@andres-granda-sungage
Copy link

andres-granda-sungage commented Aug 23, 2023

What type of feedback is this?

  • [X ] Question
  • Idea
  • [ X] Bug maybe?
  • New example or operation collection

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
Copy link

impsdc commented Jul 4, 2024

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

@andres-granda-sungage
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants