diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2017-11-14 05:38:33 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-14 05:38:33 +0900 |
| commit | 431e24fa99e44864959ff6c939a2b794d6fbaad2 (patch) | |
| tree | de11a0da3d2906c134ea458c983e24c043a6f188 /src/api/server.ts | |
| parent | Merge pull request #913 from syuilo/write-file-use-stream (diff) | |
| parent | .gitignore - uploads を削除 (diff) | |
| download | misskey-431e24fa99e44864959ff6c939a2b794d6fbaad2.tar.gz misskey-431e24fa99e44864959ff6c939a2b794d6fbaad2.tar.bz2 misskey-431e24fa99e44864959ff6c939a2b794d6fbaad2.zip | |
Merge pull request #915 from syuilo/write-file-use-stream
multer がテンポラリディレクトリにファイルを保存するように変更
Diffstat (limited to 'src/api/server.ts')
| -rw-r--r-- | src/api/server.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/server.ts b/src/api/server.ts index 3de32d9eab..026357b465 100644 --- a/src/api/server.ts +++ b/src/api/server.ts @@ -40,7 +40,7 @@ app.get('/', (req, res) => { endpoints.forEach(endpoint => endpoint.withFile ? app.post(`/${endpoint.name}`, - endpoint.withFile ? multer({ dest: 'uploads/' }).single('file') : null, + endpoint.withFile ? multer({ storage: multer.diskStorage({}) }).single('file') : null, require('./api-handler').default.bind(null, endpoint)) : app.post(`/${endpoint.name}`, require('./api-handler').default.bind(null, endpoint)) |