Why not add the first element createWriteStream?

I want to add the files to the server so

uploadFiles: async (_, { files }) => {
 const x = await Promise.all(files);
 for (const [key, value] of x.entries()) {
 const { createReadStream, filename } = value;
brduj.push(filename);
createReadStream().pipe(
 createWriteStream(path.join(__dirname, "../images", filename))
);
}
 }

but always the first item is not added. I don't understand why. How can I fix it?
April 4th 20 at 13:16
0 answer

Find more questions by tags Node.js