Reputation: 469
I'm new to Strapi and im doing a video upload site (front on React). The problem is that i need to upload big video files. I'm on strapi v3.1.1, the first problem was the limitation on the file upload(was 200MB), but i changed the maxFileSize on the node_modules/formidable/lib/incoming_form.js
. Now the file seems to upload until the end, but after that the strapi is returning an error:
error RangeError [ERR_FS_FILE_TOO_LARGE]: File size (3371964008) is greater than possible Buffer: 2147483647 bytes
at FSReqCallback.readFileAfterStat [as oncomplete] (fs.js:277:11)
*I found on internet that i should change the maxFileLimit in config/environments/development/request.json, but my config folder does not has such folders/files..
Upvotes: 2
Views: 1139
Reputation: 1758
You are right, it's possible and you need to change exactly that file. You are probably just looking at docs that are not for your version. The location of the config files has changed over one of the recent updates.
For Strapi 3.0.0 Stable you need to put these settings in ./config/middleware.js
From the docs:
Middlewares We have moved all the middleware related configurations into one place:
./config/middleware.js
The middlewares were previously configured in mutliple files:
./config/middleware.json ./config/application.json ./config/language.json ./config/environments/{env}/request.json ./config/environments/{env}/response.json ./config/environments/{env}/security.json
The actual change is not complex, just a value in a json file. Check this answer out for an example.
Upvotes: 1