diff options
| author | otofune <otofune@gmail.com> | 2017-11-07 09:30:51 +0900 |
|---|---|---|
| committer | otofune <otofune@gmail.com> | 2017-11-07 09:30:51 +0900 |
| commit | fb422b4d603c53a70712caba55b35a48a8c2e619 (patch) | |
| tree | c2e2f9af8bcbc906c0c9d92242b2db2077d30c95 /src/api/common | |
| parent | file - if 'name' param given, validate (diff) | |
| download | sharkey-fb422b4d603c53a70712caba55b35a48a8c2e619.tar.gz sharkey-fb422b4d603c53a70712caba55b35a48a8c2e619.tar.bz2 sharkey-fb422b4d603c53a70712caba55b35a48a8c2e619.zip | |
use 'name' param as GridFS file's 'filename'
Diffstat (limited to 'src/api/common')
| -rw-r--r-- | src/api/common/add-file-to-drive.ts | 3 |
1 files changed, 1 insertions, 2 deletions
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 }); |