good morning, how to change max file upload size of a field without generating a new application ? my server is up to 20 mb but appgini is restricting to 10 mb, if I upload a new application it will overwrite custom code and that would be a hassle to update, isnt there just a file I can access to change that config?
Thank you
change max file upload size without generating a new application
- D Oliveira
- AppGini Super Hero
- Posts: 347
- Joined: 2018-03-04 09:30
- Location: David
- D Oliveira
- AppGini Super Hero
- Posts: 347
- Joined: 2018-03-04 09:30
- Location: David
Re: change max file upload size without generating a new application
nevermind, started messing around and found tablename_dml.php , make sure to replace all references to the max size and you should be good to go.
thanks
thanks
-
- AppGini Super Hero
- Posts: 121
- Joined: 2020-02-16 16:29
Re: change max file upload size without generating a new application
What are the other references?D Oliveira wrote: ↑2019-03-29 14:37nevermind, started messing around and found tablename_dml.php , make sure to replace all references to the max size and you should be good to go.
thanks
I couldn't do it by just changing the tablename_dml.php
- D Oliveira
- AppGini Super Hero
- Posts: 347
- Joined: 2018-03-04 09:30
- Location: David
Re: change max file upload size without generating a new application
something like:sathukorala wrote: ↑2020-07-28 11:16What are the other references?D Oliveira wrote: ↑2019-03-29 14:37nevermind, started messing around and found tablename_dml.php , make sure to replace all references to the max size and you should be good to go.
thanks
I couldn't do it by just changing the tablename_dml.php
Code: Select all
$templateCode = str_replace('<%%UPLOADFILE(thumb)%%>', ($noUploads ? '' : "<div>{$Translation['upload image']}</div>" . '<i class="glyphicon glyphicon-remove text-danger clear-upload hidden"></i> <input type="file" name="thumb" id="thumb" data-filetypes="jpg|jpeg|gif|png" data-maxsize="10240000">'), $templateCode);
-
- AppGini Super Hero
- Posts: 121
- Joined: 2020-02-16 16:29
Re: change max file upload size without generating a new application
Yes I have changed that. But it seems it's not enough. I tried inCommon.php also but more dependencies are there.D Oliveira wrote: ↑2020-07-28 23:08something like:sathukorala wrote: ↑2020-07-28 11:16What are the other references?D Oliveira wrote: ↑2019-03-29 14:37nevermind, started messing around and found tablename_dml.php , make sure to replace all references to the max size and you should be good to go.
thanks
I couldn't do it by just changing the tablename_dml.php
Code: Select all
$templateCode = str_replace('<%%UPLOADFILE(thumb)%%>', ($noUploads ? '' : "<div>{$Translation['upload image']}</div>" . '<i class="glyphicon glyphicon-remove text-danger clear-upload hidden"></i> <input type="file" name="thumb" id="thumb" data-filetypes="jpg|jpeg|gif|png" data-maxsize="10240000">'), $templateCode);
-
- AppGini Super Hero
- Posts: 121
- Joined: 2020-02-16 16:29
Re: change max file upload size without generating a new application
D Oliveira wrote: ↑2020-07-28 23:08something like:sathukorala wrote: ↑2020-07-28 11:16What are the other references?D Oliveira wrote: ↑2019-03-29 14:37nevermind, started messing around and found tablename_dml.php , make sure to replace all references to the max size and you should be good to go.
thanks
I couldn't do it by just changing the tablename_dml.php
Code: Select all
$templateCode = str_replace('<%%UPLOADFILE(thumb)%%>', ($noUploads ? '' : "<div>{$Translation['upload image']}</div>" . '<i class="glyphicon glyphicon-remove text-danger clear-upload hidden"></i> <input type="file" name="thumb" id="thumb" data-filetypes="jpg|jpeg|gif|png" data-maxsize="10240000">'), $templateCode);
This line still works
$Translation['file too large']="Error: The file you uploaded exceeds the maximum allowed size of <MaxSize> KB";
<MaxSize> is stored somewhere else. Can Ahmed help us?
-
- AppGini Super Hero
- Posts: 121
- Joined: 2020-02-16 16:29
Re: change max file upload size without generating a new application
There are other two places where the table_dml.php has this file size by the following format:
Yet after changing that still the error occurs?
Code: Select all
$data['fields_name'] = PrepareUploadedFile('field_name', 10240000,'jpg|jpeg|gif|png', false, '');
-
- AppGini Super Hero
- Posts: 121
- Joined: 2020-02-16 16:29
Re: change max file upload size without generating a new application
At last find the solution. Jan Setzer helped a lot to find it.
You have to change below lines.
1. common.js.php
2. templates > Tablename_templateDV.html
3. Tablename_dml.php
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
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;
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>
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);
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