Automatically create redirect for a file when the file is renamed? When a file is renamed in the file upload widget and the other file is set to temporary, is there any mechanism in the background happening with the Redirect module to create a redirect from the old filepath to the new one that was renamed?

Example, foo.pdf in a file widget, I remove it and upload foo.pdf again. foo.pdf is now called foo_0.pdf - but links that linked to the old filename in the site still exist, therefore is it possible to get those redirected to this one?

edit: linking to related dilemma.
Using hook_node_presave get the url of the old one (foo.pdf) and the new url of the new one (foo_0.pdf) and then create a new redirect as shown by 4k4 here.

To get the orignal value (ex: title), I know in D7 you can with $node-&gt;original-&gt;title not sure if this still works on D8, have not yet tried it. 

Also, since your url ends with .pdf I am not sure if this will work, but hopefully it will.