psauleda Posted September 23, 2022 Share Posted September 23, 2022 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 More sharing options...
ps8modules Posted September 23, 2022 Share Posted September 23, 2022 Add to .htaccess php_value memory_limit 512M php_value upload_max_filesize 150M php_value post_max_size 150M Link to comment Share on other sites More sharing options...
psauleda Posted September 23, 2022 Author Share Posted September 23, 2022 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 More sharing options...
ps8modules Posted September 23, 2022 Share Posted September 23, 2022 ./classes/module/Module.php function useTooMuchMemory ./classes/FileUploader.php $sizeLimit ./classes/Uploader.php $_check_file_size etc. Link to comment Share on other sites More sharing options...
ps8modules Posted September 23, 2022 Share Posted September 23, 2022 By this I want to write that Prestashop has many limitations of its own. Link to comment Share on other sites More sharing options...
ComGrafPL Posted September 23, 2022 Share Posted September 23, 2022 Are you sure there's no another .zip in the module .zip file? 52mb is quite big as for module. Link to comment Share on other sites More sharing options...
psauleda Posted September 23, 2022 Author Share Posted September 23, 2022 10 minutes ago, 4you.software said: By this I want to write that Prestashop has many limitations of its own. Yes, not seems the best design, specially for an open source project. Link to comment Share on other sites More sharing options...
psauleda Posted September 23, 2022 Author Share Posted September 23, 2022 4 minutes ago, ComGrafPL said: Are you sure there's no another .zip in the module .zip file? 52mb is quite big as for module. It has some images and three javascript libraries. Link to comment Share on other sites More sharing options...
ComGrafPL Posted September 23, 2022 Share Posted September 23, 2022 1 minutę temu, psauleda napisał: It has some images and three javascript libraries. You could try it with modify and after install, copy missing files to folder. Link to comment Share on other sites More sharing options...
psauleda Posted September 23, 2022 Author Share Posted September 23, 2022 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 More sharing options...
ps8modules Posted September 23, 2022 Share Posted September 23, 2022 (edited) adminblahblahblah/themes/default/js/bundle/module/module.js line 523: maxFilesize: 50, Edited September 23, 2022 by 4you.software (see edit history) Link to comment Share on other sites More sharing options...
psauleda Posted September 23, 2022 Author Share Posted September 23, 2022 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 More sharing options...
ps8modules Posted September 23, 2022 Share Posted September 23, 2022 I see. Just a moment, I'll run the program on the PC and go through all the Prestashop files where there is a 50MB limit and let you know. Link to comment Share on other sites More sharing options...
psauleda Posted September 23, 2022 Author Share Posted September 23, 2022 Just now, 4you.software said: I see. Just a moment, I'll run the program on the PC and go through all the Prestashop files where there is a 50MB limit and let you know. thanks! Link to comment Share on other sites More sharing options...
ps8modules Posted September 23, 2022 Share Posted September 23, 2022 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 Link to comment Share on other sites More sharing options...
psauleda Posted September 23, 2022 Author Share Posted September 23, 2022 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 More sharing options...
ps8modules Posted September 23, 2022 Share Posted September 23, 2022 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. Link to comment Share on other sites More sharing options...
psauleda Posted September 23, 2022 Author Share Posted September 23, 2022 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 More sharing options...
ps8modules Posted September 23, 2022 Share Posted September 23, 2022 https://www.prestashop-project.org/slack/ Link to comment Share on other sites More sharing options...
psauleda Posted September 26, 2022 Author Share Posted September 26, 2022 On 9/23/2022 at 5:57 PM, 4you.software said: https://www.prestashop-project.org/slack/ Thanks! If i get any answer, i will put it here! Link to comment Share on other sites More sharing options...
ps8modules Posted September 26, 2022 Share Posted September 26, 2022 Hi, yes please this solution will help many. 😉 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now