GitHunt
LO

logisticinfotech/laravel-file-upload

laravel file upload extension blank problem

In Laravel when uploading files sometime getClientOriginalExtension() returns empty string.

The getClientOriginalExtension() method returns the original file extension.
It is extracted from the original file name that was uploaded. Then it should not be considered as a safe value.

We should use guessExtension() method for resolution.

The guessExtension() method returns the extension based on the mime type.

You can find our blog from this link

Languages

PHP94.6%HTML4.8%Vue0.6%

Contributors

Created December 25, 2018
Updated March 5, 2019