0

is there a way to retrieve physical file and apply into the input file field. Like assigning the $file onto it? It appears during update method of my controller keeps triggering the request validation error because its empty.

{!! Form::file('doc_upload', $file, ['id' => 'doc_upload']) !!}
Iverson
  • 179
  • 3
  • 11

1 Answers1

1

For security reasons, browsers do not let you prefill file fields.

Browsers block against setting the value attribute on input of file type for security reasons so that you can't upload a file without the user's selected any file itself.

Source

Community
  • 1
  • 1
Niraj Shah
  • 15,087
  • 3
  • 41
  • 60