summaryrefslogtreecommitdiff
path: root/src/api/common
diff options
context:
space:
mode:
authorotofune <otofune@gmail.com>2017-11-14 03:56:39 +0900
committerotofune <otofune@gmail.com>2017-11-14 03:56:39 +0900
commitf6c63fbe14e47a01a9b09c3911a7c128375440c9 (patch)
treeb1e9dcd2cb618967bcf821f632d75e0e733f71c3 /src/api/common
parentformat (diff)
downloadsharkey-f6c63fbe14e47a01a9b09c3911a7c128375440c9.tar.gz
sharkey-f6c63fbe14e47a01a9b09c3911a7c128375440c9.tar.bz2
sharkey-f6c63fbe14e47a01a9b09c3911a7c128375440c9.zip
add-file-to-drive - gmに渡す引数を正しくする
Diffstat (limited to 'src/api/common')
-rw-r--r--src/api/common/add-file-to-drive.ts2
1 files changed, 1 insertions, 1 deletions
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,