refactor: add type assertions for request parameters and explicitly type multer middleware.
This commit is contained in:
parent
04e2da43c4
commit
cad3f276f5
2 changed files with 4 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import multer from 'multer';
|
||||
import { Request } from 'express';
|
||||
import { Request, RequestHandler } from 'express';
|
||||
import { config } from '../config';
|
||||
import { ValidationError } from './errorHandler';
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ const fileFilter = (
|
|||
* Multer configuration for lesson file uploads
|
||||
* Stores files in memory for direct upload to MinIO
|
||||
*/
|
||||
export const lessonUpload = multer({
|
||||
export const lessonUpload: RequestHandler = multer({
|
||||
storage: multer.memoryStorage(),
|
||||
limits: {
|
||||
fileSize: config.upload.maxVideoSize, // Max file size (500MB for videos)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue