diff --git a/src/api/common/add-file-to-drive.ts b/src/api/common/add-file-to-drive.ts index 98f3e9635b..b4e3773c19 100644 --- a/src/api/common/add-file-to-drive.ts +++ b/src/api/common/add-file-to-drive.ts @@ -54,11 +54,10 @@ export default ( .digest('hex') as string; if (!force) { - // Check if there is a file with the same hash and same data size (to be safe) + // Check if there is a file with the same hash const much = await DriveFile.findOne({ user_id: user._id, - hash: hash, - datasize: size + hash: hash }); if (much !== null) {