brandonsavage / Upload

File uploads with validation and storage strategies
MIT License
1.67k stars 315 forks source link

File extension not being retrieved #105

Open owinocliff opened 7 years ago

owinocliff commented 7 years ago

$file->getNameWithExtension() doesn't return the name with the extension, just appends the "dot" but without the extension images

VivekMoyal28 commented 7 years ago

If you want to get the extension in PHP than you can use this

function get_file_extension($file_name) {
    return substr(strrchr($file_name,'.'),1);
}