module ActionDispatch::Http::Upload
def normalize_parameters(value)
Convert nested Hash to HashWithIndifferentAccess and replace
def normalize_parameters(value) if Hash === value && value.has_key?(:tempfile) upload = value[:tempfile] upload.extend(UploadedFile) upload.original_path = value[:filename] upload.content_type = value[:type] upload else super end end