From fb422b4d603c53a70712caba55b35a48a8c2e619 Mon Sep 17 00:00:00 2001 From: otofune Date: Tue, 7 Nov 2017 09:30:51 +0900 Subject: use 'name' param as GridFS file's 'filename' --- src/api/common/add-file-to-drive.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/api/common') diff --git a/src/api/common/add-file-to-drive.ts b/src/api/common/add-file-to-drive.ts index f9c22ccacd..e1baf08191 100644 --- a/src/api/common/add-file-to-drive.ts +++ b/src/api/common/add-file-to-drive.ts @@ -144,11 +144,10 @@ export default ( } // Create DriveFile document - const file = await addToGridFS(`${user._id}/${name}`, data, { + const file = await addToGridFS(name, data, { user_id: user._id, folder_id: folder !== null ? folder._id : null, type: mime, - name: name, comment: comment, properties: properties }); -- cgit v1.2.3-freya