From f6c63fbe14e47a01a9b09c3911a7c128375440c9 Mon Sep 17 00:00:00 2001
From: otofune <otofune@gmail.com>
Date: Tue, 14 Nov 2017 03:56:39 +0900
Subject: [PATCH] =?UTF-8?q?add-file-to-drive=20-=20gm=E3=81=AB=E6=B8=A1?=
 =?UTF-8?q?=E3=81=99=E5=BC=95=E6=95=B0=E3=82=92=E6=AD=A3=E3=81=97=E3=81=8F?=
 =?UTF-8?q?=E3=81=99=E3=82=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/api/common/add-file-to-drive.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/api/common/add-file-to-drive.ts b/src/api/common/add-file-to-drive.ts
index c6a4c4791d..1aa21f71ad 100644
--- a/src/api/common/add-file-to-drive.ts
+++ b/src/api/common/add-file-to-drive.ts
@@ -152,7 +152,7 @@ export default (
 						return null;
 					}
 					// If the file is an image, calculate width and height to save in property
-					const g = gm(data, name);
+					const g = gm(fs.createReadStream(path), name);
 					const size = await prominence(g).size();
 					const properties = {
 						width: size.width,