-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Closed
Description
- Laravel Version: 5.8.15
- PHP Version: 7.2.17
Description:
When I upload a xls file, the $request->file->extension() works and returns "xls"
But when I upload a xlsx file, the same command returns "zip" instead of "xlsx"
Why?
Steps To Reproduce:
Upload a xlsx file
Form example:
<form action="/excel" enctype="multipart/form-data" method="POST">
<div class="row">
<?= csrf_field() ?>
<div class="col-4">
<input type="file" name="excel" class="form-control"/>
</div>
<div class="col-2">
<input type="submit" class="form-control btn btn-primary">
</div>
</div>
</form>
Controller:
return var_dump($request->excel);
#and
return var_dump($request->excel->extension());
Miguelgamer812hxgdzyuyi and sentiasaMiguelgamer812
Metadata
Metadata
Assignees
Labels
No labels