xxxxxxxxxx
server {
client_max_body_size 120M;
xxxxxxxxxx
#open terminal and type
sudo nano /etc/nginx/nginx.conf
#go to http block
http {
#add this line
client_max_body_size 100M;
}
xxxxxxxxxx
#go to terminal and type
sudo nano /etc/nginx/nginx.conf
#go to http block
http {
#add this line
client_max_body_size 100M;
}
xxxxxxxxxx
const express = require("express");
const app = express();
// Increase maximum allowed request size
app.use(express.json({ limit: "50mb" }));
app.use(express.urlencoded({ limit: "50mb", extended: true }));
// ... Rest of the server configuration and routes
app.listen(3000, () => {
console.log("Server is running on port 3000");
});