migration to GridFS's DriveFile

This commit is contained in:
otofune 2017-11-06 15:18:45 +09:00
parent 7e81e0db6a
commit 18b1ef29ad
11 changed files with 66 additions and 70 deletions

View file

@ -54,9 +54,9 @@ module.exports = (params, user) => new Promise(async (res, rej) => {
if (fileId !== undefined) {
file = await DriveFile.findOne({
_id: fileId,
user_id: user._id
}, {
data: false
metadata: {
user_id: user._id
}
});
if (file === null) {