Closed vfa-locltb closed 2 years ago
I'm pretty confident this isn't a graphql-upload
bug and is more of a Nest.js usage question, which I'm not experienced in and can't really help with. You might find an answer looking at some of the past Nest.js related issues:
https://github.com/jaydenseric/graphql-upload/issues?q=is%3Aissue+nestjs
Even though this issue is closed, if anyone else who uses Nest.js would like to help feel free to comment.
Hi another nest.js developer! My friend, what is in createReadStream()? Isnt it supposed to be file system (fs) method from node.js? Any way it works for me if i use it in this way: i took file from resolver (nest.js) and use property-method creatReadStream that contains in file we got. After that it gives you stream where you can use .pipe or event .on with chunks. Sorry if i didnt understand all problem i am still new in node.js after all. I really hope I helped you because I got stuck on this a few days ago too. And I stumbled up to this issue in issues section while trying to find the same answer in browser.
I followed the tutorials online and the issue section on this page about ways to get file buffer and size but did not succeed. I've tried the method:
But it seems like the code can't even reach what's inside stream.on(); I tried to console.log(stream), and here's what it returns:
I can get the filename, mimetype. I only have problem with the createReadStream() method. Please help. Thank you.