Picture of Daniel Seixas
MaxFileSize exceeded
by Daniel Seixas - Wednesday, 12 September 2018, 10:37 AM
 

Hi everybody,

Hope you can help me with this issue. I'm trying to migrate content from adapt-authoring 0.4 to 0.5 using the export / import feature available in 0.5.

It worked reasonably well with small courses, but when I'm trying to upload a bigger course (378,6Mb) I get a MaxFileSize exceeded:

0|server   error: [11 Sep 2018 14:52:41 +02:00] Unable to import course: [maxFileSize exceeded, received 209716048 bytes of file data]

Anyone knows how to increase the file upload size limit in adapt authoring?

Thanks in advance

 

 

 

Picture of Daniel Seixas
Re: MaxFileSize exceeded
by Daniel Seixas - Thursday, 13 September 2018, 11:30 AM
 

Just in case that someone runs into the same problem, I've been able to solve it.

Node is using formidable lib to upload files... Formidable default upload size value is 200Mb.

I've been able to change this value modifying incoming_form.js file located at <adapt_folder>/node_modules/formidable/lib 

At line 28 you may change the value "200" for any desired vaule:

this.maxFileSize = opts.maxFileSize || 200 * 1024 * 1024;

 

Picture of Chuck Lorenz
Re: MaxFileSize exceeded
by Chuck Lorenz - Friday, 13 September 2019, 12:36 PM
 

Update:
Set "maxFileUploadSize" in /conf/config.json
rebuild app with
grunt build
restart server with
node server

Picture of John Niezen
Re: MaxFileSize exceeded
by John Niezen - Friday, 13 September 2019, 1:03 PM
 

Hi Chuck, is that the only place to cahnge? and what format is the size 200mB or the other?

Picture of Chuck Lorenz
Re: MaxFileSize exceeded
by Chuck Lorenz - Friday, 13 September 2019, 2:50 PM
 

John,

yes, MB in /conf/config.json

In v0.9:
I found "maxFileSize" at adapt_authoring/node_modules/formidable/lib/incoming_form.js, as mentioned above by Daniel. I increased it. AAT import manager's label still reported 200MB max. Attempted import of a file greater than that failed.

Then I found "maxFileUploadSize" in adapt_authoring/lib/configuration.js at line 84. I increased it. AAT import manager's label still reported 200MB max. Attempted import of a file greater than that failed.

Then I found "maxFileUploadSize" in adapt_authoring/conf/config.json. I increased it. AAT import manager's label now reported my limit. Attempted import of a file within that limit and it succeeded.

To satisfy my curiosity, I then reduced the max size only in /conf/config.json, and attempted to import a file greater than that limit. It failed. So I'm concluding that the only place that matters is in /conf/config,json.