You are here

public function FormUploadedFile::getErrorMessage in Drupal 10

Returns an informative upload error message.

Return value

string The error message regarding a failed upload.

Overrides UploadedFileInterface::getErrorMessage

File

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

Class

FormUploadedFile
Provides a bridge to Symfony UploadedFile.

Namespace

Drupal\file\Upload

Code

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