At last find the solution. Jan Setzer helped a lot to find it.
You have to change below lines.
1. common.js.php
Code: Select all
if(!AppGini.checkFileUpload('field_name', 'jpg|jpeg|gif|png', 10240000)) return false;
2. templates > Tablename_templateDV.html
Code: Select all
<span class="help-block collapse" id="field_name-description"><div class="alert alert-info">Maximum file size allowed: 10000 KB.<br>Allowed file types: jpg, jpeg, gif, png</div></span>
3. Tablename_dml.php
Code: Select all
$data['field_name'] = PrepareUploadedFile('field_name', 1024000, 'jpg|jpeg|gif|png', false, "");
$templateCode = str_replace('<%%UPLOADFILE(field_name)%%>', ($noUploads ? '' : "<div>{$Translation['upload file']}</div>" . '<i class="glyphicon glyphicon-remove text-danger clear-upload hidden"></i> <input type="file" name="field_name" id="field_name" data-filetypes="jpg|jpeg|gif|png" data-maxsize="10240000">'), $templateCode);
You have to change the php.ini in Apache server too
Use a standard text editor to open /etc/php/apache2/php.ini, search for the following variables and change/increase these to:
memory_limit = 512M
upload_max_filesize = 15M
post_max_size = 100M
Some more values to change if you want a better performance of your web server:
max_execution_time = 600
max_input_time = 600
memory_limit = 1024M
Save and close the editor/file and restart the apache web server with:
service apache2 restart
or
systemctl restart apache2