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

Cannot send File object thru a serializer #164

Closed
PatrLind opened this issue Oct 15, 2018 · 3 comments
Closed

Cannot send File object thru a serializer #164

PatrLind opened this issue Oct 15, 2018 · 3 comments

Comments

@PatrLind
Copy link

I am trying to send a bunch of File objects as file uploads with multipart/form-data with a custom serializer, but it seems the File objects are destroyed along the way in the convertObjectKeys function in apollo-link-rest.
Is this intended, or is this an oversight?

return Object.keys(object).reduce((acc: any, key: string) => {

@fbartho
Copy link
Collaborator

fbartho commented Oct 15, 2018

I'm not familiar with File objects, so definitely an oversight, would you mind making a unit-test? Sounds like a feature-request for using File objects to manage posting to a server!

@PatrLind
Copy link
Author

I hope I can have some time to get something like that together. I have solved it by using a normal POST thru the fetch() function instead, bypassing the REST link.

@fbartho
Copy link
Collaborator

fbartho commented Jan 5, 2022

This issue was resolved in v0.7.2! Cheers!

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

No branches or pull requests

2 participants