File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import express , { Request , Response } from "express" ;
22import cors from "cors" ;
33import fileUpload from "express-fileupload" ;
4- import { tempFileDirForUploads } from "../config/constants" ;
4+ import {
5+ tempFileDirForUploads ,
6+ maxFileUploadSizeSubscribed ,
7+ } from "../config/constants" ;
58import apikey from "../apikey/middleware" ;
69import {
710 getMedia ,
@@ -15,16 +18,16 @@ import presigned from "../presigning/middleware";
1518
1619const router = express . Router ( ) ;
1720
18- router . use (
21+ router . post (
22+ "/create" ,
23+ cors ( ) ,
1924 fileUpload ( {
2025 useTempFiles : true ,
2126 tempFileDir : tempFileDirForUploads ,
27+ limits : {
28+ fileSize : maxFileUploadSizeSubscribed ,
29+ } ,
2230 } ) ,
23- ) ;
24-
25- router . post (
26- "/create" ,
27- cors ( ) ,
2831 ( req : Request , res : Response , next : ( ...args : any [ ] ) => void ) => {
2932 const { signature } = req . query ;
3033 if ( signature ) {
You can’t perform that action at this time.
0 commit comments