GWK30
February 22, 2021, 3:56pm
1
System Information
Strapi Version : 3.4.3
Operating System : Windows 10
Database : SQLite
Node Version : 14.15.3
NPM Version : 6.14.9
Yarn Version : 1.22.5
I want to upload file 2GB.
I changed middleware.js in config like this
module.exports = {
settings: {
parser: {
enabled: true,
multipart: true,
formidable: {
maxFileSize: 20 * 1024 * 1024 * 1024,
}
}
},
};
When upload I have error The file is too big. What causes this problem? I followed Strapi documentation to change maxFilesize.
siilak
February 15, 2022, 7:36pm
2
If you use the latest version and need to upload a larger file than 256Mb… then
/config/middlewares.js
module.exports = [
"strapi::errors",
"strapi::security",
"strapi::cors",
"strapi::poweredBy",
"strapi::logger",
"strapi::query",
{
name: "strapi::body",
config: {
formLimit: "256mb",
jsonLimit: "256mb",
textLimit: "256mb",
formidable: {
maxFileSize: 200 * 1024 * 1024,
},
},
},
"strapi::favicon",
"strapi::public",
"global::globalTest",
"global::globalBlah",
];
1 Like
also note that file upload size is also configured on the webserver on which strapi is running.
incase of NGINX, you need to modify the upload size limit in the conf file.
Can u please tell me how to do it ?