diff --git a/src/api/common/add-file-to-drive.ts b/src/api/common/add-file-to-drive.ts index 7754c1e2c..98f3e9635 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)