Change tmp upload name when required filename template fields aren't
available yet. This makes non-image files still recognizable. Thanks to
@charger for reporting.