From f6c63fbe14e47a01a9b09c3911a7c128375440c9 Mon Sep 17 00:00:00 2001 From: otofune Date: Tue, 14 Nov 2017 03:56:39 +0900 Subject: add-file-to-drive - gmに渡す引数を正しくする 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(-) (limited to 'src/api/common') 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, -- cgit v1.2.3-freya