Post by dharmawebstudio » Thu Feb 06, 2020 9:35 pm

Hello to everybody.

In latest version OC 3.0.3.2; it can be found a field in Store Settings > Server Tab named "config_file_max_size".
I understand this value should limit the uploads file size, in front store and admin both.

I think this is not working for anything.
If you make a search of that string in the code "config_file_max_size"; the only reference is in controller and view of store setting form page in admin.

Please, somebody could check this; and tell me if i am wrong ... ?

Thanks.

Dharma Web Studio - Daniel Civit
Web Developer
Website: https://dharmawebstudio.com


User avatar
Active Member

Posts

Joined
Fri Jul 27, 2012 6:33 am
Location - Madrid - Spain

Post by dharmawebstudio » Thu Feb 06, 2020 10:02 pm

I think i understand what`s going on about this.

The uploads errors comes from PHP "$_FILES['filename']['error']." variable, to detect errors.
https://www.php.net/manual/es/features. ... errors.php

However, there is not "MAX_FILE_SIZE " field, inside any form; so i think this is not working .

Dharma Web Studio - Daniel Civit
Web Developer
Website: https://dharmawebstudio.com


User avatar
Active Member

Posts

Joined
Fri Jul 27, 2012 6:33 am
Location - Madrid - Spain

Post by cyclops12 » Thu Feb 06, 2020 10:51 pm

As i see it it is just for image upload size
max-file-size.png

max-file-size.png (10.47 KiB) Viewed 3864 times


Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by letxobnav » Thu Feb 06, 2020 11:09 pm

It is there, just not used I believe just like bots.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by dharmawebstudio » Fri Feb 07, 2020 1:08 am

letxobnav wrote:
Thu Feb 06, 2020 11:09 pm
It is there, just not used I believe just like bots.
I think you are right. Bots is not doing anything either.
it´s just a placebo -.... what a mess ??? ??? ???

Dharma Web Studio - Daniel Civit
Web Developer
Website: https://dharmawebstudio.com


User avatar
Active Member

Posts

Joined
Fri Jul 27, 2012 6:33 am
Location - Madrid - Spain

Post by dharmawebstudio » Fri Feb 07, 2020 1:11 am

I create these lines of code to fix this in OC 3.0.3.2. It just works with the file manager. There is another places that should be considered, but it´s a start.
I will also take the time to report this on the repository.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
    <name>Upload max file size patch</name>
    <version>1.0</version>
    <code>DWS-UPLOAD-MAX-FILE-SIZE-PATCH</code>
    <author>Dharma Web Studio</author>
    <link>https://dharmawebstudio.com</link>
    <file path="admin/controller/common/filemanager.php">
        <operation>
            <search><![CDATA[if (!in_array($file['type'], $allowed)) {]]></search>
            <add position="before"><![CDATA[
        
                    if ($file['size'] > $this->config->get('config_file_max_size')) {
                        $json['error'] = $this->language->get('error_upload_2');
                    }

                ]]>
            </add>
        </operation>
    </file>
</modification>

Dharma Web Studio - Daniel Civit
Web Developer
Website: https://dharmawebstudio.com


User avatar
Active Member

Posts

Joined
Fri Jul 27, 2012 6:33 am
Location - Madrid - Spain

Post by straightlight » Fri May 29, 2020 6:58 am

I have notified Daniel about this today. This variable key has been leftover for quite some time now ...

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by dharmawebstudio » Fri May 29, 2020 1:30 pm

Thanks for check this @straightlight.

I have would liked to collaborate with this directly in the repo, but I usually get tangled up in the workflow when I want to send a pull request. I will try to do it next time...

Dharma Web Studio - Daniel Civit
Web Developer
Website: https://dharmawebstudio.com


User avatar
Active Member

Posts

Joined
Fri Jul 27, 2012 6:33 am
Location - Madrid - Spain

Post by straightlight » Fri May 29, 2020 6:55 pm

dharmawebstudio wrote:
Fri May 29, 2020 1:30 pm
Thanks for check this @straightlight.

I have would liked to collaborate with this directly in the repo, but I usually get tangled up in the workflow when I want to send a pull request. I will try to do it next time...
I'm already in the repo as we speak for the pre-release version of OC that will be downloadable from the Opencart Github namespace. I will create a sticky topic in this forum section shortly to inform the people about the speed up of the bug fixes.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by xxvirusxx » Fri May 29, 2020 7:11 pm

straightlight wrote:
Fri May 29, 2020 6:55 pm
I'm already in the repo as we speak for the pre-release version of OC that will be downloadable from the Opencart Github namespace
You talk about 3.0.3.4?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Fri May 29, 2020 7:13 pm

xxvirusxx wrote:
Fri May 29, 2020 7:11 pm
straightlight wrote:
Fri May 29, 2020 6:55 pm
I'm already in the repo as we speak for the pre-release version of OC that will be downloadable from the Opencart Github namespace
You talk about 3.0.3.4?
Yes.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by xxvirusxx » Fri May 29, 2020 7:16 pm

You have access to merge commits?

https://github.com/opencart/opencart/pulls/condor2

I thought I'd do more pulls (for 3.0.3.4)..but no one care...

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Fri May 29, 2020 7:41 pm

xxvirusxx wrote:
Fri May 29, 2020 7:16 pm
You have access to merge commits?

https://github.com/opencart/opencart/pulls/condor2

I thought I'd do more pulls (for 3.0.3.4)..but no one care...
That will be subject to change. Soon, developers will simply have to post their commit changes and even post past relative solutions in order to increase those commit links. That way, everybody works together to speed things up. On the Opencart Github issues tab (for core bugs) and on the Pull Requests section (features), I will then review the feedbacks for the pre-release version. I spoke to Daniel about it recently. More information to come shortly on this.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gokhanalpaslan » Tue Feb 16, 2021 4:09 am

Change the value from setting table via phpmyadmin


Posts

Joined
Fri Jan 27, 2017 2:48 am
Who is online

Users browsing this forum: No registered users and 73 guests