module ActionDispatch::Http::Upload

def normalize_parameters(value)

file upload hash with UploadedFile objects
Convert nested Hash to HashWithIndifferentAccess and replace
def normalize_parameters(value)
  if Hash === value && value.has_key?(:tempfile)
    UploadedFile.new(value)
  else
    super
  end
end