Closed Froctnow closed 2 years ago
For issues like this, please share your Node.js and graphql-upload
versions.
I'm confused by the logic in that resolver. You shouldn't await the promises to resolve for all files, then after attempt to read the stream of the first. Because files resolve and stream one at a time, one after another.
See in the multiple uploads example how the entire processing of each upload, including awaiting it's promise then promisifying the stream, happens in isolation:
I figured out the error, the problem was that the service was brought up under a user who does not have access to the file when you process it in proccessRequest. I don't get any error from the library about this, and the object becomes "destroyed". I don’t know how to test and catch this, I hope no one will encounter this.
I get this when the filesystem is set to readonly
Hello, I have a resolver that receives files as input. Waiting for them to be received, then I try to create a stream, but I get an error: Error: A ReadStream cannot be created from a destroyed WriteStream. Resolver and function below. I am definitely not sending a response, the error falls exactly at the moment the createReadStream function is called.