@kne/fastify-file-manager 2.0.9 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -298,7 +298,7 @@ module.exports = fp(async (fastify, options) => {
|
|
|
298
298
|
for (const file of fileList) {
|
|
299
299
|
const filepath = path.resolve(tmpPath, file.filename);
|
|
300
300
|
const writeStream = fs.createWriteStream(filepath);
|
|
301
|
-
const fileStream = getFileReadStream(file);
|
|
301
|
+
const fileStream = await getFileReadStream(file);
|
|
302
302
|
fileStream.pipe(writeStream);
|
|
303
303
|
await new Promise((resolve, reject) => {
|
|
304
304
|
writeStream.on('finish', resolve);
|