Jump to content

Set Max Upload File Size ($Max_Upload_Size) In Contact Form


Konrud

Recommended Posts

I try to set $max_upload_size to maximum 1mb in contact form.

I've changed it in admin's panel to max 1 mb, but when I check it in dev tools (F12) in the contact form in my site it still set as  

<input type="hidden" name="MAX_FILE_SIZE" value="2097152">

I found this input is in /themes/default-bootstrap/contact-form.tpl

and it's displayed there as

<p class="form-group">
 <label for="fileUpload">{l s='Attach File'}</label>
  <input type="hidden" name="MAX_FILE_SIZE" value="{if isset($max_upload_size) && $max_upload_size}{$max_upload_size|intval}{else}1000000{/if}" />
 <input type="file" name="fileUpload" id="fileUpload" class="form-control" />
</p>

i.e. I think that $max_upload_size have default value of 2097152 and it doesn't take the value that I've set in admin's panel.

The problem is that I can't find where this $max_upload_size is defined and where does it get this default value?

 

 

Any help ?

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...