function checkExtension + handle_uploaded_file