You are here

public function FormUploadedFile::getClientOriginalName in Drupal 10

Returns the original file name.

The file name is extracted from the request that uploaded the file and as such should not be considered a safe value.

Return value

string The original file name supplied by the client.

Overrides UploadedFileInterface::getClientOriginalName

File

core/modules/file/src/Upload/FormUploadedFile.php, line 32

Class

FormUploadedFile
Provides a bridge to Symfony UploadedFile.

Namespace

Drupal\file\Upload

Code

public function getClientOriginalName() : string {
  return $this->uploadedFile
    ->getClientOriginalName();
}