-
Notifications
You must be signed in to change notification settings - Fork 574
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
File Uploads broken #2606
Comments
I was already going crazy looking for problems in my code. Glad I'm not alone with this 🤯🙌 With small images (20k) I have no problems, but try with bigger images, for example 100k and then the save file will be corrupted. I did some digging, downgrading the current version (3.8.0) to version 3.5.1 (which works). From version 3.6.0 onwards, this is where the problem appears. |
We just hit this issue ourselves. In our case the file size is the same, but the content is assembled in incorrect order (tested it with a text file for easier comparison). Is there a "built-in" way of doing streaming from a file input to a Node stream? We're using @azure/storage-blob for storing file uploads in a storage blob container and it would be nice to just stream the content more or less directly without having to read the full file content first or implement a stream reader ourselves. |
The given object implements If you can share more details, failing PR or a sandbox, we can help you better. |
Well, I'm not entirely sure what triggered this change, but here's essentially what we've been doing for file uploads:
The Readable.from call is because @azure/storage-blob's uploadStream requires a ReadableStream. This worked fine in version 3.5.1 and earlier. However, after upgrading to graphql-yoga version 3.7.3 the file content of file uploads is now jumbled. |
I can confirm there is still an issue there. Moving to Thank you a lot! |
Let's create a new issue with a reproduction or a failing test. |
Describe the bug
After uploading a file by standard example file is damaged and saved as broken.
Your Example Website or App
https://github.com/dotansimha/graphql-yoga/tree/0425ee1c4d9a0ec7aad972eb96d50c5328c5850c/examples/file-upload
Steps to Reproduce the Bug or Issue
npm run start
Expected behavior
File opened as the original file
Screenshots or Videos
Platform
@graphql-yoga/*
version(s): [e.g. 3.7.3]Additional context
I try to update and downgrade the node version. It's not dependent on it. Maybe it's something about inner coding. So please update the sample or fix it.
The text was updated successfully, but these errors were encountered: