I can't upload large files (5, 10, 15 gb) to aws s3

Hello,
I want to upload (5, 10, 15 gb) files to strapi 4 upload plugin (aws s3), but every time on uploading I got this error.


Solutions that didn’t help to solve this problem
1 NODE_OPTIONS=–max-old-space-size=10240 increase heap size
2 aws-s3 plugin that uses streams (@strapi/provider-upload-aws-s3 - npm)
Please help me if anyone have information dedicated to this question.

System Information
  • Strapi Version: 4.7.0
  • Operating System:
  • Database:
  • Node Version: 18.16.0
  • NPM Version:
  • Yarn Version:

Hi - I’m not sure if this is exactly your problem, but we had the problem that after 330 seconds the download stopped automatically because of a timeout. This was the solution: in src/index.ts (or src/index.js), in the bootstrap function, set the strapi.server.httpServer.requestTimeout to a higher value:

bootstrap({ strapi }) {
    strapi.server.httpServer.requestTimeout = 30 * 60 * 1000; 
  },

Did you find a solution to this? I am stuck :frowning:


Hey bro did you find a solution?

module.exports = [
“strapi::errors”,
/* Replace ‘strapi::body’ with this snippet /
/
Beginning of snippet /
{
name: “strapi::body”,
config: {
formLimit: “5024mb”,
jsonLimit: “250mb”,
textLimit: “250mb”,
formidable: {
maxFileSize: 5 * 1024 * 1024 * 1024, // 1 GB
uploadDir: “…/uploads”,
},
},
},
/
End of snippet */
{
name: “strapi::security”,
config: {
// Your security configuration here…
contentSecurityPolicy: {
useDefaults: true,
directives: {
“connect-src”: [“‘self’”, “https:”],
“img-src”: [
“‘self’”,
“data:”,
“blob:”,
market-assets.strapi.io”,
https://buuucket.s3.us-east-1.amazonaws.com”,
],
“media-src”: [
“‘self’”,
“data:”,
“blob:”,
market-assets.strapi.io”,
https://buuucket.s3.us-east-1.amazonaws.com”,
],
upgradeInsecureRequests: null,
},
},
},
},
“strapi::logger”,
“strapi::errors”,
“strapi::cors”,
“strapi::poweredBy”,
“strapi::query”,
“strapi::session”,
“strapi::favicon”,
“strapi::public”,
];