-import * as express from 'express'
-import * as multer from 'multer'
-import { HttpStatusCode } from '../../shared/core-utils/miscs/http-error-codes'
+import express from 'express'
+import multer, { diskStorage } from 'multer'
+import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
import { CONFIG } from '../initializers/config'
import { REMOTE_SCHEME } from '../initializers/constants'
import { getLowercaseExtension } from './core-utils'
return host
}
-function badRequest (req: express.Request, res: express.Response) {
+function badRequest (_req: express.Request, res: express.Response) {
return res.type('json')
.status(HttpStatusCode.BAD_REQUEST_400)
.end()
mimeTypes: { [id: string]: string | string[] },
destinations: { [fieldName: string]: string }
) {
- const storage = multer.diskStorage({
+ const storage = diskStorage({
destination: (req, file, cb) => {
cb(null, destinations[file.fieldname])
},