I am trying to rename upload filenames match the Post Title.

This other thread shows how to rename to hash:  

[Rename files during upload within Wordpress backend](https://stackoverflow.com/questions/3259696/rename-files-during-upload-within-wordpress-backend)

Using this code:

```
function make_filename_hash($filename) {
    $info = pathinfo($filename);
    $ext  = empty($info['extension']) ? '' : '.' . $info['extension'];
    $name = basename($filename, $ext);
    return md5($name) . $ext;
}
add_filter('sanitize_file_name', 'make_filename_hash', 10);

```

Does anyone know the code to rename the file to match Post Title.extension?