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
- Host: GitHub
- URL: https://github.com/logisticinfotech/laravel-file-upload
- Owner: logisticinfotech
- Created: 2018-12-25T06:41:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-18T10:26:29.000Z (over 6 years ago)
- Last Synced: 2025-01-02T07:10:23.761Z (6 months ago)
- Topics: file, laravel, laravel-file-upload, laravel-framework
- Language: PHP
- Homepage: https://www.logisticinfotech.com/blog/laravel-upload-file-issue-getclientoriginalextension/
- Size: 203 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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)