You are here

public function FormUploadedFile::getFilename in Drupal 10

Gets the filename.

Return value

string The filename.

Overrides UploadedFileInterface::getFilename

See also

https://php.net/manual/en/splfileinfo.getfilename.php

File

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

Class

FormUploadedFile
Provides a bridge to Symfony UploadedFile.

Namespace

Drupal\file\Upload

Code

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