You are here

public function UploadedFile::getClientOriginalExtension in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/File/UploadedFile.php \Symfony\Component\HttpFoundation\File\UploadedFile::getClientOriginalExtension()

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.

Return value

string The extension

File

vendor/symfony/http-foundation/File/UploadedFile.php, line 120

Class

UploadedFile
A file uploaded through a form.

Namespace

Symfony\Component\HttpFoundation\File

Code

public function getClientOriginalExtension() {
  return pathinfo($this->originalName, PATHINFO_EXTENSION);
}