How to change filename before it get saved without changing source URL using tamper plugin? I've URL which is mapped to file field (image) via Feed Ex.

I'm trying to change the filename before it's get saved using tamper plugins (e.g. concat or regex), however it is also changes the requesting URL causing saving the invalid image files which consist html with 404 error.

How do I use Feeds Tamper plugin to modify data (filename) after the file is downloaded but before it's get saved? Or I need to find some other alternative way of doing that?
It seems it's not possible using tamper plugins (as far as I've tried).

As workaround, this can be achieved by using hook_file_presave(), for example:

/**
 * Implements hook_file_presave().
 */
function mymodule_file_presave($file) {
  if ($file-&gt;filename == 'ShowImageXML.asp') {
    $filename = date("ymd", $file-&gt;timestamp) . '-' . $file-&gt;filesize . '.jpg';
    $uri = 'public://images/' . $filename;
    $file = file_move($file, $uri);
  }
}


See also a feature request: #2596841