You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
conststream=createReadStream();stream.on('data',(chunk: Buffer)=>{console.log('Begin');// This was never printed on the consolesize+=chunk.byteLength;buffer=chunk;console.log('Success');// This was never printed on the console});
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'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:
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.
The text was updated successfully, but these errors were encountered: