Is it a good practice to keep an uploaded file with it's tmp_name? Check the following example:
$short_tmp_name = substr($_FILES['tmp_name'], -6)
move_uploaded_file($_FILES['file'], "$uploads_dir/$short_tmp_name");
When handling file uploading like in above example:
- Will name collisions happen?
- Does this practice reveal any security issues?
EDIT:
I've clarified the question(modified the code example).