From fe87a24026ce772bccdedaca72dc2644fe9ac075 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 9 Apr 2019 01:42:07 +0900 Subject: [PATCH] Update migrate.ts --- src/migrate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/migrate.ts b/src/migrate.ts index 3b18e9fba..9785b5f31 100644 --- a/src/migrate.ts +++ b/src/migrate.ts @@ -80,7 +80,7 @@ async function main() { const bucket = await getDriveFileBucket(); const readable = bucket.openDownloadStream(file._id); const dest = fs.createWriteStream(temp); - readable.on('data', chunk => dest.write(chunk)); + readable.pipe(dest); readable.on('end', () => { dest.end(); res();