X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fexpress-utils.ts;h=38fe6926baed2708b4cd2192a794893a28028131;hb=624e42fdf9456816f92000e632d01390f3b5c840;hp=c299b70f139ef590432574fe57e524c1c55715e9;hpb=421ff4618da64f0849353383f690a014024c40da;p=github%2FChocobozzz%2FPeerTube.git 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 @@ -import * as express from 'express' -import * as multer from 'multer' +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' @@ -70,7 +70,7 @@ function createReqFiles ( 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]) },