From 38ffbe95e9d67c336c0f6aaccf26833b2f35ac8c 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 3b18e9fbaa..9785b5f31c 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();