Generate a hidden_tag when using a file_field

Closes #17947
@egilburg I think the core convetion is to use `fetch` over access hash keys on this case. Like this https://github.com/rails/rails/blob/master/actionview/lib/action_view/helpers/tags/base.rb#L125