From 3ae707e16cde48c64ed35489317591ec0b92021f Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Tue, 31 Jan 2017 23:28:29 +0900
Subject: [PATCH] [Server] Fix bug

---
 src/api/common/add-file-to-drive.ts | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/api/common/add-file-to-drive.ts b/src/api/common/add-file-to-drive.ts
index 7754c1e2c9..98f3e9635b 100644
--- a/src/api/common/add-file-to-drive.ts
+++ b/src/api/common/add-file-to-drive.ts
@@ -70,8 +70,10 @@ export default (
 	// Fetch all files to calculate drive usage
 	const files = await DriveFile
 		.find({ user_id: user._id }, {
-			datasize: true,
-			_id: false
+			fields: {
+				datasize: true,
+				_id: false
+			}
 		});
 
 	// Calculate drive usage (in byte)