An open API service indexing awesome lists of open source software.

https://github.com/logisticinfotech/laravel-file-upload

laravel file upload extension blank problem
https://github.com/logisticinfotech/laravel-file-upload

file laravel laravel-file-upload laravel-framework

Last synced: 4 months ago
JSON representation

laravel file upload extension blank problem

Awesome Lists containing this project

README

        

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](https://www.logisticinfotech.com/blog/laravel-upload-file-issue-getclientoriginalextension)