1

Frontend is based over Reactjs using Ant as the design pattern. Hitting backed which is over Node/Express(Strapi CMS) which uploads file over s3.

Smaller files less than 200 mb works fine , But larger files greater than 400Mb fails when server code is deployed over Aws Ec2.

1 Answers1

0

Currently the Strapi middleware in charge of parsing requests needs to be configured to support file sizes larger than the default of 200MB.

You can pass configuration to the middleware directly by setting it in the parser middleware configuration in config/middleware.js

module.exports = {
  //...
  settings: {
    parser: {
      enabled: true,
      multipart: true,
      formidable: {
        maxFileSize: 200 * 1024 * 1024 // Defaults to 200mb
      }
    }
  },
  //...
};

Btw, If you are using nginx as the reverse proxy server in your EC2, then you also need to update client_max_body_size parameter. Refer this How to edit nginx.conf to increase file size upload

Rahul Singh
  • 690
  • 1
  • 5
  • 10