redupload flexible attachment field name

Find attachment[x][file] field name automatically for compatibility
with different versions of Redmine.