upload file size limit increased in server.ts
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 1m6s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 1m6s
This commit is contained in:
@@ -28,7 +28,11 @@ logger.info('-----------------------------------------------\n');
|
||||
const app = express();
|
||||
|
||||
// --- Core Middleware ---
|
||||
app.use(express.json()); // Middleware to parse JSON request bodies
|
||||
// Increase the limit for JSON and URL-encoded bodies. This is crucial for handling large file uploads
|
||||
// that are part of multipart/form-data requests, as the overall request size is checked.
|
||||
// Setting a 50MB limit to accommodate large flyer images.
|
||||
app.use(express.json({ limit: '100mb' }));
|
||||
app.use(express.urlencoded({ limit: '100mb', extended: true }));
|
||||
app.use(cookieParser()); // Middleware to parse cookies
|
||||
app.use(passport.initialize()); // Initialize Passport
|
||||
|
||||
|
||||
Reference in New Issue
Block a user