How can I truncate uploaded file name
You could use a presave hook and rename the file before it gets saved: https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_file_presave/7