Jump to content

PrestaShop Addons size limited to 50Mb with a hardcoded value?


Recommended Posts

Hello, I was trying to upload a custom module to prestashop 1.7, and get this error:

Quote

File is too big (52.59MiB). Max filesize: 50MiB.


I've checked with phpinfo that it's not caused by my php settings:

Quote

memory_limit    512M
post_max_size    150M
upload_max_filesize    100M


Searching on the web, I find that this value seems to be hardcoded on the file:

Quote

adminblahblahblah/themes/default/js/bundle/module/module.js


One of its lines says:

Quote

maxFilesize: 50, // can't be greater than 50Mb because it's an addons limitation


But editing that value, donesn't seem to do nothing.


It's really hardcoded this value and is an addons limitation? or can be changed and how?


Thanks for your help!

Link to comment
Share on other sites

4 minutes ago, 4you.software said:

Add to .htaccess

 

php_value memory_limit 512M

php_value upload_max_filesize 150M

php_value post_max_size 150M

It's my own machine, I have that values in apache php.ini, and cheked with a phpinfo() that are in effect in that vhost.

Link to comment
Share on other sites

1 minute ago, ComGrafPL said:

You could try it with modify and after install, copy missing files to folder.

I'm just uploading the code with rsync+ssh, so i have a workaround.

But seems so odd to have a hardcoded value for that, not easily editable in a config file or elsewhere.

Link to comment
Share on other sites

31 minutes ago, 4you.software said:

adminblahblahblah/themes/default/js/bundle/module/module.js

line 523:

maxFilesize: 50,

Already tried to editing the value on that line, but even after cleaning caches in browser and prestashop, doesn't have any effect.

Link to comment
Share on other sites

10 minutes ago, 4you.software said:

All JS:

maxFilesize: 50 =>

/admin/themes/default/js/bundle/module/module.js
/admin/themes/new-theme/js/pages/module/controller.js
/modules/ps_themecusto/views/js/controllers/advanced/back.js

I have tried with all three, changing the 50 to 250, and -just in case- clearing ps cache and browser cache, but none of them worked.

Link to comment
Share on other sites

Just now, 4you.software said:

I haven't discovered a limitation anywhere else in javascript.
Unfortunately I can't help.
Maybe the Prestashop developers will help and tell the world where they made the 50MB limit apart from these three files.

🙂

Yes, is there a place where I can ask them?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...