What seems to be the problem:
Every file I upload is being saved without a file extension. Laravel docs indicate that the extension is auto-generated from the file MIME Type but when I dump the Livewire\TemporaryUploadedFile the MIME Type is always “application/octet-stream”. Checking the MIME Type manually on the temp file and saved file without an extension returns the proper value.
Steps to Reproduce:
- Upload file with wire:model type='file"
- Save the file with $logo->store(‘assets’)
- See that it gets no extension
The code example below dumps the file data to show there is no extension and gets incorrect mimeType compared to manual check.
Are you using the latest version of Livewire:
Yes
Do you have any screenshots or code examples:
<input type="file" wire:model="logo">
@if($logo)
{{ $logo->getMimeType() }}
{{ dump($logo) }}
@endif