Laravel File upload issue -
i want upload file in laravel show error like
fileexception in uploadedfile.php line 251: file "april.xlsx" not uploaded due unknown error.
i use 'files'=>true
in form tag. , in controller code is
$mandatorydocument = $input['mandatorydocument']; if($mandatorydocument != null) { $mandatoryfile = time().'-'.$mandatorydocument->getclientoriginalname(); $mandatorydocument->move(public_path().'/files/mandatory_documents/',$mandatoryfile); $achievement->file_path = $mandatoryfile; }
when dd($input['mandatorydocument'])
in controller get
uploadedfile {#27 ▼ -test: false -originalname: "april.xlsx" -mimetype: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" -size: 12297 -error: 0 }
, file moved in /public/files/mandatory_documents
error. why error come. problem? thank you.
Comments
Post a Comment