function UploadedFileInterface::getClientOriginalName

Same name and namespace in other branches
  1. 9 core/modules/file/src/Upload/UploadedFileInterface.php \Drupal\file\Upload\UploadedFileInterface::getClientOriginalName()
  2. 10 core/modules/file/src/Upload/UploadedFileInterface.php \Drupal\file\Upload\UploadedFileInterface::getClientOriginalName()

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.

2 methods override UploadedFileInterface::getClientOriginalName()
FormUploadedFile::getClientOriginalName in core/modules/file/src/Upload/FormUploadedFile.php
Returns the original file name.
InputStreamUploadedFile::getClientOriginalName in core/modules/file/src/Upload/InputStreamUploadedFile.php
Returns the original file name.

File

core/modules/file/src/Upload/UploadedFileInterface.php, line 22

Class

UploadedFileInterface
Provides an interface for uploaded files.

Namespace

Drupal\file\Upload

Code

public function getClientOriginalName() : string;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.