Answer the question
In order to leave comments, you need to log in
Why is the first element of createWriteStream not added?
I want to add files to server like this
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))
);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question