The following tips will help you in setting the maximum size of uploaded files that exist on the tiki.
- Open file /lib/filegals/max_upload_size.php, then search the following script:@$max_upload_size = $tikilib->return_bytes(ini_get('upload_max_filesize'));
- Suppose that the maximum uploaded file size is 200kb (kilobytes), then change the above script into:
@$max_upload_size = 200 * 1024; //(1 kb = 1024 bytes)Please be noticed that maximum size of the uploaded files should be less than the initial setting of maximum file size to be uploaded setting in the php.ini. - Save and close / lib/filegals/max_upload_size.ph
- Open file file /tiki-upload_file.php.
- Insert the following scripts, right before the script // Check the name:
//Check file size, begin
if ($_FILES["userfile"]['size'][$key] > $max_upload_size) {
$errors[]= tra(' Warning: Your file size is too big:') . ' ' . $_FILES["userfile"]["name"][$key] . '. ' . tra(' Try to compress the uploaded file under the maximum file size allowed (See: Maximum file size is around, below).');
continue;
}
//Check file size, end - Save and close /tiki-upload_file.php. Finish, now you can upload a file with your custom size.
No comments:
Post a Comment