diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts index 8b54330787..f5a2bad56c 100644 --- a/src/services/drive/add-file.ts +++ b/src/services/drive/add-file.ts @@ -118,7 +118,8 @@ const addFile = async ( // Check if there is a file with the same hash const much = await DriveFile.findOne({ md5: hash, - 'metadata.userId': user._id + 'metadata.userId': user._id, + deletedAt: { $exists: false } }); if (much !== null) {