diff options
Diffstat (limited to 'server/helpers/express-utils.ts')
-rw-r--r-- | server/helpers/express-utils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/express-utils.ts b/server/helpers/express-utils.ts index c299b70f1..38fe6926b 100644 --- a/server/helpers/express-utils.ts +++ b/server/helpers/express-utils.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as express from 'express' | 1 | import express from 'express' |
2 | import * as multer from 'multer' | 2 | import multer, { diskStorage } from 'multer' |
3 | import { HttpStatusCode } from '../../shared/models/http/http-error-codes' | 3 | import { HttpStatusCode } from '../../shared/models/http/http-error-codes' |
4 | import { CONFIG } from '../initializers/config' | 4 | import { CONFIG } from '../initializers/config' |
5 | import { REMOTE_SCHEME } from '../initializers/constants' | 5 | import { REMOTE_SCHEME } from '../initializers/constants' |
@@ -70,7 +70,7 @@ function createReqFiles ( | |||
70 | mimeTypes: { [id: string]: string | string[] }, | 70 | mimeTypes: { [id: string]: string | string[] }, |
71 | destinations: { [fieldName: string]: string } | 71 | destinations: { [fieldName: string]: string } |
72 | ) { | 72 | ) { |
73 | const storage = multer.diskStorage({ | 73 | const storage = diskStorage({ |
74 | destination: (req, file, cb) => { | 74 | destination: (req, file, cb) => { |
75 | cb(null, destinations[file.fieldname]) | 75 | cb(null, destinations[file.fieldname]) |
76 | }, | 76 | }, |