marco
November 13, 2020, 3:00pm
1
System Information
Strapi Version : 3.0.4
Operating System : Ubuntu 20.10
Database : MongoDB
Node Version : v13.7.0
NPM Version : 6.13.6
Yarn Version :
Hi,
i’m woking with STRAPI v3.0.4, if i try to upload e file greather then 209779528 bytes I have this error “strapi error Error: maxFileSize exceeded, received 209779528 bytes”.
I modified /…/strapi/config/middleware.js file in this way and after run “npm run build”, but it dosen’ work.
Could you help me?
module.exports = {
settings: {
parser: {
enabled: true,
multipart: true,
formidable: {
maxFileSize: 545259520,
},
},
},
};
related GitHub issue:
opened 04:09PM - 13 Nov 20 UTC
closed 09:57PM - 16 Nov 20 UTC
issue: help wanted
## Bug report
[2020-11-13T15:56:51.369Z] error Error: maxFileSize exceeded, rec… eived 209779580 bytes of file data
at Stream.<anonymous> (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/incoming_form.js:222:19)
at Stream.emit (events.js:321:20)
at MultipartParser.parser.onPartData (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/incoming_form.js:387:14)
at callback (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/multipart_parser.js:102:31)
at dataCallback (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/multipart_parser.js:112:11)
at MultipartParser.write (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/multipart_parser.js:305:3)
at IncomingForm.write (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/incoming_form.js:159:34)
at IncomingMessage.<anonymous> (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/incoming_form.js:125:12)
at IncomingMessage.emit (events.js:321:20)
at IncomingMessage.Readable.read (_stream_readable.js:508:10)
at flow (_stream_readable.js:979:34)
at resume_ (_stream_readable.js:960:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
[2020-11-13T15:56:51.372Z] debug POST /upload?id=5faa9d4b96efda5b4c6cb513 (7425 ms) 50
### Describe the bug
### Steps to reproduce the behavior
1. I have a collection with a field type MEDIA
2. If i try to upload in the STRAPI collections a file .mp4 greather then 209779528 bytes I have this error “strapi error Error: maxFileSize exceeded, received 209779528 bytes”.
I modified /…/strapi/config/middleware.js file in this way and after run “npm run build”, but it dosen’ work.
Could you help me?
### Expected behavior
I want to upload file, mp3 or mp4 greather then 209779528 bytes
### Screenshots
[2020-11-13T15:56:51.369Z] error Error: maxFileSize exceeded, received 209779580 bytes of file data
at Stream.<anonymous> (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/incoming_form.js:222:19)
at Stream.emit (events.js:321:20)
at MultipartParser.parser.onPartData (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/incoming_form.js:387:14)
at callback (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/multipart_parser.js:102:31)
at dataCallback (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/multipart_parser.js:112:11)
at MultipartParser.write (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/multipart_parser.js:305:3)
at IncomingForm.write (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/incoming_form.js:159:34)
at IncomingMessage.<anonymous> (/home/marco/prg/Ideha/strapi/node_modules/formidable/lib/incoming_form.js:125:12)
at IncomingMessage.emit (events.js:321:20)
at IncomingMessage.Readable.read (_stream_readable.js:508:10)
at flow (_stream_readable.js:979:34)
at resume_ (_stream_readable.js:960:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
[2020-11-13T15:56:51.372Z] debug POST /upload?id=5faa9d4b96efda5b4c6cb513 (7425 ms) 50
### Code snippets config/middleware.js
module.exports = {
settings: {
parser: {
enabled: true,
multipart: true,
formidable: {
maxFileSize: 545259520,
},
},
},
load: {
before: ['timer', 'responseTime', 'logger', 'cors', 'responses', 'gzip'],
order: [],
after: ['parser', 'router'],
},
};
### System
Strapi Version: 3.0.4
Operating System: Ubuntu 20.10
Database: MongoDB
Node Version: v13.7.0
NPM Version: 6.13.6

Can you please provide the information I mentioned in that comment:
Can you please try testing with the current latest version? v3.3.3 (you specified Strapi Version: 3.0.4
as your version)
marco
November 18, 2020, 8:27am
3
I tested with latest version, but the problem remain. To solve it is necessary also add this code to …/strapi/config/middleware.js file:
parser: { enabled: true, multipart: true, formidable: { maxFileSize: 10737418240 } }
marco:
I tested with latest version, but the problem remain
strapi error Error: maxFileSize exceeded, received 209779528 bytes
In the latest version, you get the same error as in 3.0.4?
marco
November 19, 2020, 10:57am
5
marco:
I tested with latest version, but the problem remain. To solve it is necessary also add this code to …/strapi/config/middleware.js file:
parser: { enabled: true, multipart: true, formidable: { maxFileSize: 10737418240 } }
yes, to solve it is necessary ALSO add code to strapi/config/middleware.js file